blob: 43c3e75d657a278f4a6e55df1bb22aa8ed3fe6c2 [file] [log] [blame]
developerd4975692022-07-15 18:30:03 +08001From: Felix Fietkau <nbd@nbd.name>
2Date: Wed, 13 Jul 2022 07:32:26 +0200
3Subject: [PATCH] mac80211: exclude multicast packets from AQL pending airtime
4
5In AP mode, multicast traffic is handled very differently from normal traffic,
6especially if at least one client is in powersave mode.
7This means that multicast packets can be buffered a lot longer than normal
8unicast packets, and can eat up the AQL budget very quickly because of the low
9data rate.
10Along with the recent change to maintain a global PHY AQL limit, this can lead
11to significant latency spikes for unicast traffic.
12
13Since queueing multicast to hardware is currently not constrained by AQL limits
14anyway, let's just exclude it from the AQL pending airtime calculation entirely.
15
16Fixes: 8e4bac067105 ("wifi: mac80211: add a per-PHY AQL limit to improve fairness")
17Signed-off-by: Felix Fietkau <nbd@nbd.name>
18---
19
20--- a/net/mac80211/tx.c
21+++ b/net/mac80211/tx.c
22@@ -3792,7 +3792,7 @@ begin:
23 encap_out:
24 IEEE80211_SKB_CB(skb)->control.vif = vif;
25
26- if (vif &&
27+ if (tx.sta &&
28 wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) {
29 bool ampdu = txq->ac != IEEE80211_AC_VO;
30 u32 airtime;