diff options
author | Bing Zhao <bzhao@marvell.com> | 2013-05-17 17:50:21 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-22 15:08:51 -0400 |
commit | 4c1079e1583958b83d7355ccbba686ad08b67015 (patch) | |
tree | e7150d2310e874c6450d8e888c53503cbc84bb1d | |
parent | 75ab753d7704f0bd34e09d5e4081bc73fdddd775 (diff) | |
download | op-kernel-dev-4c1079e1583958b83d7355ccbba686ad08b67015.zip op-kernel-dev-4c1079e1583958b83d7355ccbba686ad08b67015.tar.gz |
mwifiex: abort remaining scan commands when association started
A full-channel scan is split to multiple scan commands in driver
before they are sent to firmware. When each scan result is back
the SSID entries are parsed and informed to cfg80211 directly.
It's observed that sometimes userspace may initiate association
as soon as the target AP is found. During the 4-way handshake
firmware may go off-channel to scan the remaining channels.
This causes the 4-way handshake to fail.
Fix it by checking 'scan_block' flag and aborting the remaining
scan in this case. 'scan_block' flag is set after association
and before 4-way handshake. It gets cleared after 4-way handshake
is completed.
Tested-by: Jason Abele <jabele@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index 7b2566b..801b6b7 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c @@ -1793,7 +1793,8 @@ check_next_scan: dev_dbg(adapter->dev, "info: scan already aborted\n"); } } else { - if (priv->scan_aborting && !priv->scan_request) { + if ((priv->scan_aborting && !priv->scan_request) || + priv->scan_block) { spin_unlock_irqrestore(&adapter->scan_pending_q_lock, flags); adapter->scan_delay_cnt = MWIFIEX_MAX_SCAN_DELAY_CNT; |