diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-11-19 11:55:49 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-19 18:45:58 +0100 |
commit | 6ea0a69ca21bbddab5b3979c2190013b0263e749 (patch) | |
tree | 27fe05578c960fa946d68ce8db3dfead88b47b49 /net/mac80211/util.c | |
parent | ad2b26abc157460ca6fac1a53a2bfeade283adfa (diff) | |
download | op-kernel-dev-6ea0a69ca21bbddab5b3979c2190013b0263e749.zip op-kernel-dev-6ea0a69ca21bbddab5b3979c2190013b0263e749.tar.gz |
mac80211: rcu-ify scan and scheduled scan request pointers
In order to use the scan and scheduled scan request pointers during
RX to check for randomisation, make them accessible using RCU.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 745a8a9..0ad534a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1721,6 +1721,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) int res, i; bool reconfig_due_to_wowlan = false; struct ieee80211_sub_if_data *sched_scan_sdata; + struct cfg80211_sched_scan_request *sched_scan_req; bool sched_scan_stopped = false; #ifdef CONFIG_PM @@ -2011,13 +2012,15 @@ int ieee80211_reconfig(struct ieee80211_local *local) mutex_lock(&local->mtx); sched_scan_sdata = rcu_dereference_protected(local->sched_scan_sdata, lockdep_is_held(&local->mtx)); - if (sched_scan_sdata && local->sched_scan_req) + sched_scan_req = rcu_dereference_protected(local->sched_scan_req, + lockdep_is_held(&local->mtx)); + if (sched_scan_sdata && sched_scan_req) /* * Sched scan stopped, but we don't want to report it. Instead, * we're trying to reschedule. */ if (__ieee80211_request_sched_scan_start(sched_scan_sdata, - local->sched_scan_req)) + sched_scan_req)) sched_scan_stopped = true; mutex_unlock(&local->mtx); |