diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-01-29 07:56:20 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-04 21:58:10 +0100 |
commit | cc901de1bcb0372583466075bfa62e3049dc6288 (patch) | |
tree | ae12805ea7a7e39e55e811fcc15c9b12a68fe078 /net/mac80211/cfg.c | |
parent | c46a73f39642db4931544a9376338d05aa196df8 (diff) | |
download | linux-cc901de1bcb0372583466075bfa62e3049dc6288.tar.gz linux-cc901de1bcb0372583466075bfa62e3049dc6288.tar.bz2 linux-cc901de1bcb0372583466075bfa62e3049dc6288.zip |
mac80211: fix sdata->radar_required locking
radar_required setting wasn't protected by
local->mtx in some places. This should prevent
from scanning/radar detection/roc colliding.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index b98dc8ce8e25..27fa53bfed0d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -970,9 +970,9 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, /* TODO: make hostapd tell us what it wants */ sdata->smps_mode = IEEE80211_SMPS_OFF; sdata->needed_rx_chains = sdata->local->rx_chains; - sdata->radar_required = params->radar_required; mutex_lock(&local->mtx); + sdata->radar_required = params->radar_required; err = ieee80211_vif_use_channel(sdata, ¶ms->chandef, IEEE80211_CHANCTX_SHARED); mutex_unlock(&local->mtx); @@ -3002,8 +3002,8 @@ static void ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata) struct ieee80211_local *local = sdata->local; int err, changed = 0; - sdata->radar_required = sdata->csa_radar_required; mutex_lock(&local->mtx); + sdata->radar_required = sdata->csa_radar_required; err = ieee80211_vif_change_channel(sdata, &changed); mutex_unlock(&local->mtx); if (WARN_ON(err < 0)) |