mac80211: handle sched_scan_stopped vs. hw restart race
authorEliad Peller <eliad@wizery.com>
Tue, 5 Jan 2016 14:28:06 +0000 (16:28 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 14 Jan 2016 10:10:20 +0000 (11:10 +0100)
commit2bc533bd9dcf48eaf4af6fb89a338734a9e8f76e
tree28c71b45c5e1e3e38ff73918fae71cdecd965069
parent1a57081add2529fb4d8d11e7385990e7e550d30b
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>
net/mac80211/main.c
net/mac80211/scan.c