mac80211: assure we also cancel deferred scan request
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 6 Oct 2010 09:22:10 +0000 (11:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 Oct 2010 20:30:42 +0000 (16:30 -0400)
commit4136c4224ccf1907d309e1cdfaefef9da97dbc5e
treebe65af6057850d068b7858f5679a00b64fb2e92d
parente229f844d7223b7063bea1e649203ac521a58fe1
mac80211: assure we also cancel deferred scan request

This is partial revert and fix for commit
85f72bc839705294b32b6c16b491c0422f0a71b3 "mac80211: only cancel
software-based scans on suspend"

When cfg80211 request the scan and mac80211 perform some management work,
we defer the scan request. We do not canceling such requests when calling
ieee80211_scan_cancel(), because of SCAN_SW_SCANNING bit check just
before the call. So fix that problem.

Another problem, which commit 85f72bc839705294b32b6c16b491c0422f0a71b3
tries to solve, is we can not cancel HW scan. Hence patch make
ieee80211_scan_cancel() ignore HW scan (see code comments). Keeping
local->mtx lock assures that the deferred scan will not become
"working" HW scan.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/main.c
net/mac80211/pm.c
net/mac80211/scan.c