diff mbox

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

Message ID 1451896654-24765-3-git-send-email-kengyu@canonical.com
State New
Headers show

Commit Message

Keng-Yu Lin Jan. 4, 2016, 8:37 a.m. UTC
From: Amitkumar Karwar <akarwar@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@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
Tested-by: Gavin Lin <gavin.lin@canonical.com>
Reviewed-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c | 6 +++---
 drivers/net/wireless/mwifiex/ie.c       | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

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;
 }