summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorArik Nemtsov2012-06-06 10:25:02 +0200
committerJohannes Berg2012-06-18 19:18:53 +0200
commit04800ada2acc3a9ffc754c1d73576cef326f3311 (patch)
treec3b298de7409ec82b19d206c66d84558c09637d6 /net/mac80211/main.c
parentmac80211: fix the assignment of mesh element TTL (diff)
downloadkernel-qcow2-linux-04800ada2acc3a9ffc754c1d73576cef326f3311.tar.gz
kernel-qcow2-linux-04800ada2acc3a9ffc754c1d73576cef326f3311.tar.xz
kernel-qcow2-linux-04800ada2acc3a9ffc754c1d73576cef326f3311.zip
mac80211: stop Rx during HW reconfig
While HW reconfig is in progress, drop all incoming Rx. This prevents incoming packets from changing the internal state of the driver or calling callbacks of the low level driver while it is in inconsistent state. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index d81c178c7712..976e41365c25 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -345,6 +345,13 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)
ieee80211_stop_queues_by_reason(hw,
IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+ /*
+ * Stop all Rx during the reconfig. We don't want state changes
+ * or driver callbacks while this is in progress.
+ */
+ local->in_reconfig = true;
+ barrier();
+
schedule_work(&local->restart_work);
}
EXPORT_SYMBOL(ieee80211_restart_hw);