diff options
author | Simon Wunderlich <sw@simonwunderlich.de> | 2013-11-21 18:19:51 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-02 11:51:54 +0100 |
commit | e487eaeb076a44c69dc61348cbc903151bb8fcbd (patch) | |
tree | 715d57f18ec0f3e3565a711f43248a3b8c8a42eb /drivers | |
parent | mac80211: modify beacon using sdata/wdev-lock, not rtnl lock (diff) | |
download | linux-e487eaeb076a44c69dc61348cbc903151bb8fcbd.tar.xz linux-e487eaeb076a44c69dc61348cbc903151bb8fcbd.zip |
cfg80211/mac80211/ath6kl: acquire wdev lock outside ch_switch_notify
The channel switch notification should be sent under the
wdev/sdata-lock, preferably in the same moment as the channel change
happens, to avoid races by other callers (e.g. start/stop_ap).
This also adds the previously missing sdata_lock protection in
csa_finalize_work.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 36dc61da8336..fd4c89df67e1 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -1109,7 +1109,9 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq, (mode == WMI_11G_HT20) ? NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT); + mutex_lock(&vif->wdev.mtx); cfg80211_ch_switch_notify(vif->ndev, &chandef); + mutex_unlock(&vif->wdev.mtx); } static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, |