mwifiex: abort remaining scan commands when association started
authorBing Zhao <bzhao@marvell.com>
Thu, 9 May 2013 18:57:11 +0000 (11:57 -0700)
committerChromeBot <chrome-bot@google.com>
Fri, 10 May 2013 23:37:00 +0000 (16:37 -0700)
commit53dace5945544a9d2e7a8a3b4bd1b9023e3e591a
tree77c0a5d602554f361880b45520b111ef8cd6f723
parentc8361ee8a7a8a57af5593f6dda50515e6b7f7998
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.

BUG=chrome-os-partner:18188
TEST=autotest against CrOS_chaos_WesternDigital_5 (Jason Abele)

Change-Id: Ibda61178f2aee7228989bedb511eb2abc5a40343
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/50687
Reviewed-by: Paul Stewart <pstew@chromium.org>
drivers/net/wireless/mwifiex/scan.c