mac80211: update to 2015-12-03
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 622-rt2x00-fix-beacon-bit-balance.patch
1 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
2 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
3 @@ -632,12 +632,8 @@ void rt2x00mac_bss_info_changed(struct i
4 } else if (bss_conf->enable_beacon && !intf->enable_beacon) {
5 rt2x00dev->intf_beaconing++;
6 intf->enable_beacon = true;
7 - /*
8 - * Upload beacon to the H/W. This is only required on
9 - * USB devices. PCI devices fetch beacons periodically.
10 - */
11 - if (rt2x00_is_usb(rt2x00dev))
12 - rt2x00queue_update_beacon(rt2x00dev, vif);
13 +
14 + rt2x00queue_update_beacon(rt2x00dev, vif);
15
16 if (rt2x00dev->intf_beaconing == 1) {
17 /*
18 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
19 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
20 @@ -144,7 +144,8 @@ static void rt2x00lib_intf_scheduled_ite
21
22 if (test_and_clear_bit(DELAYED_UPDATE_BEACON, &intf->delayed_flags)) {
23 mutex_lock(&intf->beacon_skb_mutex);
24 - rt2x00queue_update_beacon(rt2x00dev, vif);
25 + if (intf->enable_beacon)
26 + rt2x00queue_update_beacon(rt2x00dev, vif);
27 mutex_unlock(&intf->beacon_skb_mutex);
28 }
29 }
30 @@ -207,6 +208,7 @@ static void rt2x00lib_beaconupdate_iter(
31 struct ieee80211_vif *vif)
32 {
33 struct rt2x00_dev *rt2x00dev = data;
34 + struct rt2x00_intf *intf = vif_to_intf(vif);
35
36 if (vif->type != NL80211_IFTYPE_AP &&
37 vif->type != NL80211_IFTYPE_ADHOC &&
38 @@ -220,7 +222,8 @@ static void rt2x00lib_beaconupdate_iter(
39 * never be called for USB devices.
40 */
41 WARN_ON(rt2x00_is_usb(rt2x00dev));
42 - rt2x00queue_update_beacon(rt2x00dev, vif);
43 + if (intf->enable_beacon)
44 + rt2x00queue_update_beacon(rt2x00dev, vif);
45 }
46
47 void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)