diff options
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index ddeb5a709aa3..a87ee9b6585a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
| @@ -621,20 +621,18 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
| 621 | bss_conf->bssid); | 621 | bss_conf->bssid); |
| 622 | 622 | ||
| 623 | /* | 623 | /* |
| 624 | * Update the beacon. This is only required on USB devices. PCI | ||
| 625 | * devices fetch beacons periodically. | ||
| 626 | */ | ||
| 627 | if (changes & BSS_CHANGED_BEACON && rt2x00_is_usb(rt2x00dev)) | ||
| 628 | rt2x00queue_update_beacon(rt2x00dev, vif); | ||
| 629 | |||
| 630 | /* | ||
| 631 | * Start/stop beaconing. | 624 | * Start/stop beaconing. |
| 632 | */ | 625 | */ |
| 633 | if (changes & BSS_CHANGED_BEACON_ENABLED) { | 626 | if (changes & BSS_CHANGED_BEACON_ENABLED) { |
| 634 | if (!bss_conf->enable_beacon && intf->enable_beacon) { | 627 | if (!bss_conf->enable_beacon && intf->enable_beacon) { |
| 635 | rt2x00queue_clear_beacon(rt2x00dev, vif); | ||
| 636 | rt2x00dev->intf_beaconing--; | 628 | rt2x00dev->intf_beaconing--; |
| 637 | intf->enable_beacon = false; | 629 | intf->enable_beacon = false; |
| 630 | /* | ||
| 631 | * Clear beacon in the H/W for this vif. This is needed | ||
| 632 | * to disable beaconing on this particular interface | ||
| 633 | * and keep it running on other interfaces. | ||
| 634 | */ | ||
| 635 | rt2x00queue_clear_beacon(rt2x00dev, vif); | ||
| 638 | 636 | ||
| 639 | if (rt2x00dev->intf_beaconing == 0) { | 637 | if (rt2x00dev->intf_beaconing == 0) { |
| 640 | /* | 638 | /* |
| @@ -645,11 +643,15 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
| 645 | rt2x00queue_stop_queue(rt2x00dev->bcn); | 643 | rt2x00queue_stop_queue(rt2x00dev->bcn); |
| 646 | mutex_unlock(&intf->beacon_skb_mutex); | 644 | mutex_unlock(&intf->beacon_skb_mutex); |
| 647 | } | 645 | } |
| 648 | |||
| 649 | |||
| 650 | } else if (bss_conf->enable_beacon && !intf->enable_beacon) { | 646 | } else if (bss_conf->enable_beacon && !intf->enable_beacon) { |
| 651 | rt2x00dev->intf_beaconing++; | 647 | rt2x00dev->intf_beaconing++; |
| 652 | intf->enable_beacon = true; | 648 | intf->enable_beacon = true; |
| 649 | /* | ||
| 650 | * Upload beacon to the H/W. This is only required on | ||
| 651 | * USB devices. PCI devices fetch beacons periodically. | ||
| 652 | */ | ||
| 653 | if (rt2x00_is_usb(rt2x00dev)) | ||
| 654 | rt2x00queue_update_beacon(rt2x00dev, vif); | ||
| 653 | 655 | ||
| 654 | if (rt2x00dev->intf_beaconing == 1) { | 656 | if (rt2x00dev->intf_beaconing == 1) { |
| 655 | /* | 657 | /* |
