rt2x00: change beaconing locking
[deliverable/linux.git] / drivers / net / wireless / rt2x00 / rt2x00mac.c
index a87ee9b6585a72cdad0394d773b17a69a8b80298..d63636bbb9d741e2ea8f66061556aa709f320f42 100644 (file)
@@ -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);
        }
 
        /*
@@ -749,7 +747,8 @@ void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw)
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll);
 
-void rt2x00mac_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
+void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+                    u32 queues, bool drop)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
        struct data_queue *queue;
@@ -798,6 +797,8 @@ int rt2x00mac_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
 
        setup.tx = tx_ant;
        setup.rx = rx_ant;
+       setup.rx_chain_num = 0;
+       setup.tx_chain_num = 0;
 
        rt2x00lib_config_antenna(rt2x00dev, setup);
 
This page took 0.05775 seconds and 5 git commands to generate.