380-mac80211-fix-reordering-of-buffered-broadcast-packet.patch 1017 B

12345678910111213141516171819202122232425262728
  1. From: Felix Fietkau <[email protected]>
  2. Date: Wed, 28 Nov 2018 22:36:06 +0100
  3. Subject: [PATCH] mac80211: fix reordering of buffered broadcast packets
  4. If the buffered broadcast queue contains packets, letting new packets bypass
  5. that queue can lead to heavy reordering, since the driver is probably throttling
  6. transmission of buffered multicast packets after beacons.
  7. Keep buffering packets until the buffer has been cleared (and no client
  8. is in powersave mode).
  9. Cc: [email protected]
  10. Signed-off-by: Felix Fietkau <[email protected]>
  11. ---
  12. --- a/net/mac80211/tx.c
  13. +++ b/net/mac80211/tx.c
  14. @@ -439,8 +439,8 @@ ieee80211_tx_h_multicast_ps_buf(struct i
  15. if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL))
  16. info->hw_queue = tx->sdata->vif.cab_queue;
  17. - /* no stations in PS mode */
  18. - if (!atomic_read(&ps->num_sta_ps))
  19. + /* no stations in PS mode and no buffered packets */
  20. + if (!atomic_read(&ps->num_sta_ps) && skb_queue_empty(&ps->bc_buf))
  21. return TX_CONTINUE;
  22. info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM;