aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-11-28 22:39:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-13 09:21:37 +0100
commit5a7b2af0c7ec872ffd4b0b87e4f102108e112af0 (patch)
tree6721a13039c74ca8422751f0503b0613b700fe3d
parent00512a2e8e64d20f49b6f1b0e2d0cbf49cdb3039 (diff)
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). Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 ea5dfefd765a..c1c27a516e45 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -431,8 +431,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
if (ieee80211_hw_check(&tx->local->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;