Commit b74d6e74 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Kalle Valo

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarXinming Hu <huxm@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 8a190237
...@@ -2250,6 +2250,9 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -2250,6 +2250,9 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
return -EALREADY; return -EALREADY;
} }
if (priv->scan_block)
priv->scan_block = false;
if (adapter->surprise_removed || adapter->is_cmd_timedout) { if (adapter->surprise_removed || adapter->is_cmd_timedout) {
mwifiex_dbg(adapter, ERROR, mwifiex_dbg(adapter, ERROR,
"%s: Ignore connection.\t" "%s: Ignore connection.\t"
...@@ -2468,6 +2471,9 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy, ...@@ -2468,6 +2471,9 @@ mwifiex_cfg80211_scan(struct wiphy *wiphy,
return -EBUSY; return -EBUSY;
} }
if (!priv->wdev.current_bss && priv->scan_block)
priv->scan_block = false;
if (!mwifiex_stop_bg_scan(priv)) if (!mwifiex_stop_bg_scan(priv))
cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy); cfg80211_sched_scan_stopped_rtnl(priv->wdev.wiphy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment