diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2010-10-06 05:22:10 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-06 16:30:42 -0400 |
commit | 4136c4224ccf1907d309e1cdfaefef9da97dbc5e (patch) | |
tree | be65af6057850d068b7858f5679a00b64fb2e92d /net/mac80211/pm.c | |
parent | e229f844d7223b7063bea1e649203ac521a58fe1 (diff) |
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>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r-- | net/mac80211/pm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index e3e2bce3bb41..e37355193ed1 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -12,8 +12,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
12 | struct ieee80211_sub_if_data *sdata; | 12 | struct ieee80211_sub_if_data *sdata; |
13 | struct sta_info *sta; | 13 | struct sta_info *sta; |
14 | 14 | ||
15 | if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning))) | 15 | ieee80211_scan_cancel(local); |
16 | ieee80211_scan_cancel(local); | ||
17 | 16 | ||
18 | ieee80211_stop_queues_by_reason(hw, | 17 | ieee80211_stop_queues_by_reason(hw, |
19 | IEEE80211_QUEUE_STOP_REASON_SUSPEND); | 18 | IEEE80211_QUEUE_STOP_REASON_SUSPEND); |