diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2014-06-05 13:52:23 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-19 21:49:14 +0200 |
commit | 283dafa1c69475596701da7767df471c0a71d8fb (patch) | |
tree | b6f11ab5c0c8fdb540a3dbadae0593519d37407e /drivers/net/wireless/rt2x00/rt2x00mac.c | |
parent | mwifiex: Remove custom world regulatory domain (diff) | |
download | linux-283dafa1c69475596701da7767df471c0a71d8fb.tar.xz linux-283dafa1c69475596701da7767df471c0a71d8fb.zip |
rt2x00: change beaconing locking
This patch is needed for further changes to keep global variables
consistent when changing beaconing on diffrent vif's.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 671836210744..d63636bbb9d7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -624,6 +624,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, * Start/stop beaconing. */ if (changes & BSS_CHANGED_BEACON_ENABLED) { + mutex_lock(&intf->beacon_skb_mutex); if (!bss_conf->enable_beacon && intf->enable_beacon) { rt2x00dev->intf_beaconing--; intf->enable_beacon = false; @@ -639,9 +640,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, * Last beaconing interface disabled * -> stop beacon queue. */ - mutex_lock(&intf->beacon_skb_mutex); rt2x00queue_stop_queue(rt2x00dev->bcn); - mutex_unlock(&intf->beacon_skb_mutex); } } else if (bss_conf->enable_beacon && !intf->enable_beacon) { rt2x00dev->intf_beaconing++; @@ -658,11 +657,10 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, * First beaconing interface enabled * -> start beacon queue. */ - mutex_lock(&intf->beacon_skb_mutex); rt2x00queue_start_queue(rt2x00dev->bcn); - mutex_unlock(&intf->beacon_skb_mutex); } } + mutex_unlock(&intf->beacon_skb_mutex); } /* |