From: Emmanuel Grumbach Date: Mon, 16 Sep 2013 08:12:07 +0000 (+0300) Subject: mac80211: correctly close cancelled scans X-Git-Tag: v3.12-rc7~20^2~20^2^2~2^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a754055a1296fcbe6f32de3a5eaca6efb2fd1865;p=pandora-kernel.git mac80211: correctly close cancelled scans __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. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- Reading git-diff-tree failed