summaryrefslogtreecommitdiff
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-06-06 11:25:02 +0300
committerJohannes Berg <johannes.berg@intel.com>2012-06-18 19:18:53 +0200
commit04800ada2acc3a9ffc754c1d73576cef326f3311 (patch)
treec3b298de7409ec82b19d206c66d84558c09637d6 /net/mac80211/rx.c
parent58886a9011f8eae705b9f585ec6c80b34f3c4e6c (diff)
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/rx.c')
-rw-r--r--net/mac80211/rx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 6fd2cb0838c4..072e8f3afa2b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3027,6 +3027,10 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
if (unlikely(local->quiescing || local->suspended))
goto drop;
+ /* We might be during a HW reconfig, prevent Rx for the same reason */
+ if (unlikely(local->in_reconfig))
+ goto drop;
+
/*
* The same happens when we're not even started,
* but that's worth a warning.