[PATCH 2/8] [Vivid][SRU re-spin][SAUCE] mwifiex: handle start AP error paths correctly

Keng-Yu Lin kengyu at canonical.com
Mon Jan 4 08:37:28 UTC 2016


From: Amitkumar Karwar <akarwar at marvell.com>

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 <akarwar at marvell.com>
Signed-off-by: Cathy Luo <cluo at marvell.com>
Signed-off-by: Keng-Yu Lin <kengyu at canonical.com>
Tested-by: Gavin Lin <gavin.lin at canonical.com>
Reviewed-by: Wen-chien Jesse Sung <jesse.sung at canonical.com>
---
 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;
 }
-- 
1.9.1





More information about the kernel-team mailing list