aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/marvell
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2016-06-29 17:32:40 +0530
committerKalle Valo <kvalo@codeaurora.org>2016-07-08 16:44:03 +0300
commitb74d6e740be36d6d0c05f3386520fb44bae886b3 (patch)
tree64c654c21f4e157a0e29f5d4cf149d79f9aa038e /drivers/net/wireless/marvell
parentrtlwifi: Fix typo in printk (diff)
downloadlinux-dev-b74d6e740be36d6d0c05f3386520fb44bae886b3.tar.xz
linux-dev-b74d6e740be36d6d0c05f3386520fb44bae886b3.zip
mwifiex: fix scan_block flag handling
scan_block flag is used to block scan operation when 4 way handshake is in progress. Sometimes it doesn't get cleared due to incomplete association. An example is assoc request/response is done, but add key operation get canceled in some corner cases. As a result, further association/scan operations are blocked. This patch fixes the problem by clearing scan_block flag. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/cfg80211.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index e6befd58cbd5..867ab815e16a 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -2250,6 +2250,9 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
return -EALREADY;
}
+ if (priv->scan_block)
+ priv->scan_block = false;
+
if (adapter->surprise_removed || adapter->is_cmd_timedout) {
mwifiex_dbg(adapter, ERROR,
"%s: Ignore connection.\t"
@@ -2468,6 +2471,9 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
return -EBUSY;
}
+ if (!priv->wdev.current_bss && priv->scan_block)
+ priv->scan_block = false;
+
if (!mwifiex_stop_bg_scan(priv))
cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy);