Commit 4c1079e1 authored by Bing Zhao's avatar Bing Zhao Committed by John W. Linville

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: default avatarJason Abele <jabele@chromium.org>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 75ab753d
...@@ -1793,7 +1793,8 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv, ...@@ -1793,7 +1793,8 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
dev_dbg(adapter->dev, "info: scan already aborted\n"); dev_dbg(adapter->dev, "info: scan already aborted\n");
} }
} else { } 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, spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
flags); flags);
adapter->scan_delay_cnt = MWIFIEX_MAX_SCAN_DELAY_CNT; adapter->scan_delay_cnt = MWIFIEX_MAX_SCAN_DELAY_CNT;
......
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