diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-09-02 00:12:28 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-02 00:12:28 +0400 |
commit | 85f72bc839705294b32b6c16b491c0422f0a71b3 (patch) | |
tree | c2aec95a5b7315cc7e5bff44a28eb26d045d64e5 /net/mac80211/pm.c | |
parent | 18145c69349f2ab60c470798f83b3a2639e2a8d9 (diff) | |
download | linux-85f72bc839705294b32b6c16b491c0422f0a71b3.tar.xz |
mac80211: only cancel software-based scans on suspend
Otherwise the hardware scan handler could access an invalid scan request
structure. The driver should cancel any pending hardware scans during
the suspend process anyway, so also add a warning if the hardware scan
is still pending when the device resumes.
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, 2 insertions, 1 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index d287fde0431d..ce671dfd238c 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c @@ -12,7 +12,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) struct ieee80211_sub_if_data *sdata; struct sta_info *sta; - ieee80211_scan_cancel(local); + if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning))) + ieee80211_scan_cancel(local); ieee80211_stop_queues_by_reason(hw, IEEE80211_QUEUE_STOP_REASON_SUSPEND); |