summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2015-10-25 10:59:35 +0200
committerJohannes Berg <johannes.berg@intel.com>2015-11-03 10:41:01 +0100
commit43d6df007c0cc111ab8ead8bd95aafab9bb4531d (patch)
tree6ea7037c8c50329d376c9ca70778623c8fb81f03 /net/mac80211/main.c
parenta64cba3c5330704a034bd3179270b8d04daf6987 (diff)
downloadlinux-43d6df007c0cc111ab8ead8bd95aafab9bb4531d.tar.bz2
mac80211: use freezable workqueue for restart work
Requesting hw restart during suspend might result in the restart work being executed after mac80211 and the hw are suspended. Solve the race by simply scheduling the restart work on a freezable workqueue. Note that there can be some cases of reconfiguration on resume (besides the hardware restart): * wowlan is not configured - All the interfaces removed were removed on suspend, and drv_stop() was called. At this point the driver shouldn't expect for hw_restart anyway, so we can simply cancel it (on resume). * wowlan is configured, drv_resume() == 1 There is no definitive expected behavior in this case, as each driver might have different expectations (e.g. setting some flags on suspend/restart vs. not handling spurious recovery). For now, simply let the hw_restart work run again after resume, and hope the driver will handle it well (or at least initiate another hw restart). 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/main.c')
-rw-r--r--net/mac80211/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 273c96de4910..858f6b1cb149 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -281,7 +281,7 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)
local->in_reconfig = true;
barrier();
- schedule_work(&local->restart_work);
+ queue_work(system_freezable_wq, &local->restart_work);
}
EXPORT_SYMBOL(ieee80211_restart_hw);