diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2015-01-22 16:34:10 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-01-23 04:54:22 -0500 |
commit | 332ff7fe36bfdcab4ae7d35a2273ce431bf15171 (patch) | |
tree | 036a58a7056e307f2aa5086b0cb39e5582f8803b /net/mac80211 | |
parent | 4afaff176a968457df18eeebc1aad910b6154761 (diff) |
mac80211: complete scan work immediately if quiesced or suspended
It is possible that a deferred scan is queued after the queues are
flushed in __ieee80211_suspend(). The deferred scan work may be
scheduled by ROC or ieee80211_stop_poll().
To make sure don't start a new scan while suspending, check whether
we're quiescing or suspended and complete the scan immediately if
that's the case.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/scan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 7807fa42ed3f..05f0d711b6d8 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -828,6 +828,11 @@ void ieee80211_scan_work(struct work_struct *work) | |||
828 | 828 | ||
829 | mutex_lock(&local->mtx); | 829 | mutex_lock(&local->mtx); |
830 | 830 | ||
831 | if (!ieee80211_can_run_worker(local)) { | ||
832 | aborted = true; | ||
833 | goto out_complete; | ||
834 | } | ||
835 | |||
831 | sdata = rcu_dereference_protected(local->scan_sdata, | 836 | sdata = rcu_dereference_protected(local->scan_sdata, |
832 | lockdep_is_held(&local->mtx)); | 837 | lockdep_is_held(&local->mtx)); |
833 | scan_req = rcu_dereference_protected(local->scan_req, | 838 | scan_req = rcu_dereference_protected(local->scan_req, |