diff options
author | Eliad Peller <eliad@wizery.com> | 2016-01-05 16:28:06 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-01-14 11:10:20 +0100 |
commit | 2bc533bd9dcf48eaf4af6fb89a338734a9e8f76e (patch) | |
tree | 28c71b45c5e1e3e38ff73918fae71cdecd965069 /net/mac80211/scan.c | |
parent | 1a57081add2529fb4d8d11e7385990e7e550d30b (diff) | |
download | linux-2bc533bd9dcf48eaf4af6fb89a338734a9e8f76e.tar.bz2 |
mac80211: handle sched_scan_stopped vs. hw restart race
On hw restart, mac80211 might try to reconfigure already
stopped sched scan, if ieee80211_sched_scan_stopped_work()
wasn't scheduled yet.
This in turn will keep the device driver with scheduled scan
configured, while both mac80211 and cfg80211 will clear
their sched scan state once the work is scheduled.
Fix it by ignoring ieee80211_sched_scan_stopped() calls
while in hw restart, and flush the work before starting
the reconfiguration.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index a413e52f7691..8eb68ef42e8c 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -1213,6 +1213,14 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw) trace_api_sched_scan_stopped(local); + /* + * this shouldn't really happen, so for simplicity + * simply ignore it, and let mac80211 reconfigure + * the sched scan later on. + */ + if (local->in_reconfig) + return; + schedule_work(&local->sched_scan_stopped_work); } EXPORT_SYMBOL(ieee80211_sched_scan_stopped); |