summaryrefslogtreecommitdiff
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-07-06 21:55:11 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-07-12 12:10:43 +0200
commit5260a5b2c3524f198ea062fe0a6a4faa724e6a9d (patch)
tree9524bf3dbcb65b6a0125e6a276e313527fd4d4d2 /net/mac80211/main.c
parente2fd5dbc1c7031be5b5de043bcc0a18c7a59a68a (diff)
mac80211: track scheduled scan virtual interface
Instead of tracking whether or not we're in a scheduled scan, track the virtual interface (sdata) in an RCU-protected pointer to make it usable from RX to check the MAC address. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index c794101f8987..c26e231c733a 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -322,7 +322,8 @@ static void ieee80211_restart_work(struct work_struct *work)
mutex_lock(&local->mtx);
WARN(test_bit(SCAN_HW_SCANNING, &local->scanning) ||
- local->sched_scanning,
+ rcu_dereference_protected(local->sched_scan_sdata,
+ lockdep_is_held(&local->mtx)),
"%s called with hardware scan in progress\n", __func__);
mutex_unlock(&local->mtx);