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