Commit 8834d360 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville

rt2x00: fix beaconing on USB

When disable beaconing we clear register with beacon and newer set it
back, what make we stop send beacons infinitely.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f8d2b920
...@@ -620,21 +620,19 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, ...@@ -620,21 +620,19 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL, rt2x00lib_config_intf(rt2x00dev, intf, vif->type, NULL,
bss_conf->bssid); bss_conf->bssid);
/*
* Update the beacon. This is only required on USB devices. PCI
* devices fetch beacons periodically.
*/
if (changes & BSS_CHANGED_BEACON && rt2x00_is_usb(rt2x00dev))
rt2x00queue_update_beacon(rt2x00dev, vif);
/* /*
* Start/stop beaconing. * Start/stop beaconing.
*/ */
if (changes & BSS_CHANGED_BEACON_ENABLED) { if (changes & BSS_CHANGED_BEACON_ENABLED) {
if (!bss_conf->enable_beacon && intf->enable_beacon) { if (!bss_conf->enable_beacon && intf->enable_beacon) {
rt2x00queue_clear_beacon(rt2x00dev, vif);
rt2x00dev->intf_beaconing--; rt2x00dev->intf_beaconing--;
intf->enable_beacon = false; intf->enable_beacon = false;
/*
* Clear beacon in the H/W for this vif. This is needed
* to disable beaconing on this particular interface
* and keep it running on other interfaces.
*/
rt2x00queue_clear_beacon(rt2x00dev, vif);
if (rt2x00dev->intf_beaconing == 0) { if (rt2x00dev->intf_beaconing == 0) {
/* /*
...@@ -645,11 +643,15 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, ...@@ -645,11 +643,15 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
rt2x00queue_stop_queue(rt2x00dev->bcn); rt2x00queue_stop_queue(rt2x00dev->bcn);
mutex_unlock(&intf->beacon_skb_mutex); mutex_unlock(&intf->beacon_skb_mutex);
} }
} else if (bss_conf->enable_beacon && !intf->enable_beacon) { } else if (bss_conf->enable_beacon && !intf->enable_beacon) {
rt2x00dev->intf_beaconing++; rt2x00dev->intf_beaconing++;
intf->enable_beacon = true; intf->enable_beacon = true;
/*
* Upload beacon to the H/W. This is only required on
* USB devices. PCI devices fetch beacons periodically.
*/
if (rt2x00_is_usb(rt2x00dev))
rt2x00queue_update_beacon(rt2x00dev, vif);
if (rt2x00dev->intf_beaconing == 1) { if (rt2x00dev->intf_beaconing == 1) {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment