]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iwlwifi: fix scan race
authorReinette Chatre <reinette.chatre@intel.com>
Tue, 2 Feb 2010 18:57:12 +0000 (10:57 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Apr 2010 14:48:02 +0000 (07:48 -0700)
commit6722260b066a1de80228d71da99ab71ebdcc7ae8
tree5544de39c4aeec40ad118372bbf34fb5016850bd
parent5393cd90a45d38d8457855ccff2240666554c815
iwlwifi: fix scan race

commit bbcbb9ef9735c67da303d30bd6beb9e699f0f508 upstream.

There is a problem if an "internal short scan" is in progress when a
mac80211 requested scan arrives. If this new scan request arrives within
the "next_scan_jiffies" period then driver will immediately return success
and complete the scan. The problem here is that the scan has not been
fully initialized at this time (is_internal_short_scan is still set to true
because of the currently running scan), which results in the scan
completion never to be sent to mac80211. At this time also, evan though the
internal short scan is still running the state (is_internal_short_scan)
will be set to false, so when the internal scan does complete then mac80211
will receive a scan completion.

Fix this by checking right away if a scan is in progress when a scan
request arrives from mac80211.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-scan.c