summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-11-28 22:39:16 +0100
committerBen Hutchings <ben@decadent.org.uk>2019-02-11 17:54:20 +0000
commit2dc0c7c77e3ed24bf15ab3d176653b7c7fe98f3c (patch)
treee69c24c077abcb200649c9b4f4cc8317f2528cd6
parent37c3fc2e49bf95a57d46fb8c56a9d8bd723c35c3 (diff)
downloadlinux-stable-2dc0c7c77e3ed24bf15ab3d176653b7c7fe98f3c.tar.gz
linux-stable-2dc0c7c77e3ed24bf15ab3d176653b7c7fe98f3c.tar.bz2
linux-stable-2dc0c7c77e3ed24bf15ab3d176653b7c7fe98f3c.zip
mac80211: fix reordering of buffered broadcast packets
commit 9ec1190d065998650fd9260dea8cf3e1f56c0e8c upstream. If the buffered broadcast queue contains packets, letting new packets bypass that queue can lead to heavy reordering, since the driver is probably throttling transmission of buffered multicast packets after beacons. Keep buffering packets until the buffer has been cleared (and no client is in powersave mode). Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--net/mac80211/tx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index ca6131c452b5..d698d23dceed 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -417,8 +417,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)
info->hw_queue = tx->sdata->vif.cab_queue;
- /* no stations in PS mode */
- if (!atomic_read(&ps->num_sta_ps))
+ /* no stations in PS mode and no buffered packets */
+ if (!atomic_read(&ps->num_sta_ps) && skb_queue_empty(&ps->bc_buf))
return TX_CONTINUE;
info->flags |= IEEE80211_TX_CTL_SEND_AFTER_DTIM;