From patchwork Mon Jan 4 08:37:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keng-Yu Lin X-Patchwork-Id: 562271 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3BF011402F0; Mon, 4 Jan 2016 19:37:57 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1aG0eE-0002wz-9k; Mon, 04 Jan 2016 08:37:50 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1aG0e9-0002vv-K5 for kernel-team@lists.ubuntu.com; Mon, 04 Jan 2016 08:37:45 +0000 Received: from 61-231-142-110.dynamic.hinet.net ([61.231.142.110] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aG0e8-0004PO-Rw; Mon, 04 Jan 2016 08:37:45 +0000 From: Keng-Yu Lin To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/8] [Vivid][SRU re-spin][SAUCE] mwifiex: handle start AP error paths correctly Date: Mon, 4 Jan 2016 16:37:28 +0800 Message-Id: <1451896654-24765-3-git-send-email-kengyu@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1451896654-24765-1-git-send-email-kengyu@canonical.com> References: <1451896654-24765-1-git-send-email-kengyu@canonical.com> Cc: alex.kaluzhny@canonical.com, gavin.lin@canonical.com, tim.chen119@canonical.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Amitkumar Karwar It's been observed that even if firmware returns an error for a configuration command, we go ahead and start AP. This patch changes the command type from async to sync so that threads waits for command response and return failure start AP. BugLink: https://launchpad.net/bugs/1528910 Signed-off-by: Amitkumar Karwar Signed-off-by: Cathy Luo Signed-off-by: Keng-Yu Lin Tested-by: Gavin Lin Reviewed-by: Wen-chien Jesse Sung --- drivers/net/wireless/mwifiex/cfg80211.c | 6 +++--- drivers/net/wireless/mwifiex/ie.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 4a66a655..0a7d5c5 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -1521,8 +1521,8 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy, if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_SYS_CONFIG, HostCmd_ACT_GEN_SET, - UAP_BSS_PARAMS_I, bss_cfg, false)) { - wiphy_err(wiphy, "Failed to set the SSID\n"); + UAP_BSS_PARAMS_I, bss_cfg, true)) { + wiphy_err(wiphy, "Failed to set AP configuration\n"); kfree(bss_cfg); return -1; } @@ -1530,7 +1530,7 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy, kfree(bss_cfg); if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_START, - HostCmd_ACT_GEN_SET, 0, NULL, false)) { + HostCmd_ACT_GEN_SET, 0, NULL, true)) { wiphy_err(wiphy, "Failed to start the BSS\n"); return -1; } diff --git a/drivers/net/wireless/mwifiex/ie.c b/drivers/net/wireless/mwifiex/ie.c index b933794..6690609 100644 --- a/drivers/net/wireless/mwifiex/ie.c +++ b/drivers/net/wireless/mwifiex/ie.c @@ -140,7 +140,7 @@ mwifiex_update_autoindex_ies(struct mwifiex_private *priv, if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) return mwifiex_send_cmd(priv, HostCmd_CMD_UAP_SYS_CONFIG, HostCmd_ACT_GEN_SET, - UAP_CUSTOM_IE_I, ie_list, false); + UAP_CUSTOM_IE_I, ie_list, true); return 0; }