aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c50
1 files changed, 43 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index f3da051df39..1b3edef9e3d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -139,9 +139,9 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
139 * either RTS or CTS-to-self frame and handles everything 139 * either RTS or CTS-to-self frame and handles everything
140 * inside the hardware. 140 * inside the hardware.
141 */ 141 */
142 if ((tx_info->control.rates[0].flags & (IEEE80211_TX_RC_USE_RTS_CTS | 142 if (!rt2x00dev->ops->hw->set_rts_threshold &&
143 IEEE80211_TX_RC_USE_CTS_PROTECT)) && 143 (tx_info->control.rates[0].flags & (IEEE80211_TX_RC_USE_RTS_CTS |
144 !rt2x00dev->ops->hw->set_rts_threshold) { 144 IEEE80211_TX_RC_USE_CTS_PROTECT))) {
145 if (rt2x00queue_available(queue) <= 1) 145 if (rt2x00queue_available(queue) <= 1)
146 goto exit_fail; 146 goto exit_fail;
147 147
@@ -617,11 +617,47 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
617 bss_conf->bssid); 617 bss_conf->bssid);
618 618
619 /* 619 /*
620 * Update the beacon. 620 * Update the beacon. This is only required on USB devices. PCI
621 * devices fetch beacons periodically.
621 */ 622 */
622 if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_ENABLED)) 623 if (changes & BSS_CHANGED_BEACON && rt2x00_is_usb(rt2x00dev))
623 rt2x00queue_update_beacon(rt2x00dev, vif, 624 rt2x00queue_update_beacon(rt2x00dev, vif);
624 bss_conf->enable_beacon); 625
626 /*
627 * Start/stop beaconing.
628 */
629 if (changes & BSS_CHANGED_BEACON_ENABLED) {
630 if (!bss_conf->enable_beacon && intf->enable_beacon) {
631 rt2x00queue_clear_beacon(rt2x00dev, vif);
632 rt2x00dev->intf_beaconing--;
633 intf->enable_beacon = false;
634
635 if (rt2x00dev->intf_beaconing == 0) {
636 /*
637 * Last beaconing interface disabled
638 * -> stop beacon queue.
639 */
640 mutex_lock(&intf->beacon_skb_mutex);
641 rt2x00queue_stop_queue(rt2x00dev->bcn);
642 mutex_unlock(&intf->beacon_skb_mutex);
643 }
644
645
646 } else if (bss_conf->enable_beacon && !intf->enable_beacon) {
647 rt2x00dev->intf_beaconing++;
648 intf->enable_beacon = true;
649
650 if (rt2x00dev->intf_beaconing == 1) {
651 /*
652 * First beaconing interface enabled
653 * -> start beacon queue.
654 */
655 mutex_lock(&intf->beacon_skb_mutex);
656 rt2x00queue_start_queue(rt2x00dev->bcn);
657 mutex_unlock(&intf->beacon_skb_mutex);
658 }
659 }
660 }
625 661
626 /* 662 /*
627 * When the association status has changed we must reset the link 663 * When the association status has changed we must reset the link