622-rt2x00-fix-beacon-bit-balance.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
  2. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c
  3. @@ -627,12 +627,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. if (rt2x00dev->intf_beaconing == 1) {
  16. /*
  17. --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  18. +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
  19. @@ -144,7 +144,8 @@ static void rt2x00lib_intf_scheduled_ite
  20. if (test_and_clear_bit(DELAYED_UPDATE_BEACON, &intf->delayed_flags)) {
  21. mutex_lock(&intf->beacon_skb_mutex);
  22. - rt2x00queue_update_beacon(rt2x00dev, vif);
  23. + if (intf->enable_beacon)
  24. + rt2x00queue_update_beacon(rt2x00dev, vif);
  25. mutex_unlock(&intf->beacon_skb_mutex);
  26. }
  27. }
  28. @@ -207,6 +208,7 @@ static void rt2x00lib_beaconupdate_iter(
  29. struct ieee80211_vif *vif)
  30. {
  31. struct rt2x00_dev *rt2x00dev = data;
  32. + struct rt2x00_intf *intf = vif_to_intf(vif);
  33. if (vif->type != NL80211_IFTYPE_AP &&
  34. vif->type != NL80211_IFTYPE_ADHOC &&
  35. @@ -220,7 +222,8 @@ static void rt2x00lib_beaconupdate_iter(
  36. * never be called for USB devices.
  37. */
  38. WARN_ON(rt2x00_is_usb(rt2x00dev));
  39. - rt2x00queue_update_beacon(rt2x00dev, vif);
  40. + if (intf->enable_beacon)
  41. + rt2x00queue_update_beacon(rt2x00dev, vif);
  42. }
  43. void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)