]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mac80211: correctly close cancelled scans
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 16 Sep 2013 08:12:07 +0000 (11:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Nov 2013 03:01:48 +0000 (12:01 +0900)
commitb9ef1eea8bc243c4435c85ea5a30c647ea19995a
treea6fac05862d731b40e7f43640803e27421c60de8
parent609a45c1bbd45beb7a042b09488f1f971f4a2999
mac80211: correctly close cancelled scans

commit a754055a1296fcbe6f32de3a5eaca6efb2fd1865 upstream.

__ieee80211_scan_completed is called from a worker. This
means that the following flow is possible.

 * driver calls ieee80211_scan_completed
 * mac80211 cancels the scan (that is already complete)
 * __ieee80211_scan_completed runs

When scan_work will finally run, it will see that the scan
hasn't been aborted and might even trigger another scan on
another band. This leads to a situation where cfg80211's
scan is not done and no further scan can be issued.

Fix this by setting a new flag when a HW scan is being
cancelled so that no other scan will be triggered.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/ieee80211_i.h
net/mac80211/scan.c