[PATCH wireless-next v2 2/7] wifi: mac80211: use the ampdu argument of ieee80211_calc_expected_tx_airtime()

From: Julius Bairaktaris

Date: Sat Nov 28 2026 - 11:04:07 EST


Since ieee80211_rate_expected_tx_airtime() was split out,
ieee80211_calc_expected_tx_airtime() passes true to it and ignores its
own ampdu argument. ieee80211_tx_dequeue() passes false for a frame on
the VO queue, which AQL is then charged as part of an A-MPDU: its PHY
overhead is divided by 2 to 64 instead of charged in full.

Pass ampdu on.

Found by an LLM review (Claude) of the airtime code.

Fixes: 094dc1619cb0 ("wifi: mac80211: factor out part of ieee80211_calc_expected_tx_airtime")
Signed-off-by: Julius Bairaktaris <julius@xxxxxxxxxxxxxx>
---
v2:
- New.

net/mac80211/airtime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/airtime.c b/net/mac80211/airtime.c
index 55bc451d4a9d..d3b911fb711a 100644
--- a/net/mac80211/airtime.c
+++ b/net/mac80211/airtime.c
@@ -843,7 +843,7 @@ u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
u32 duration;

duration = ieee80211_rate_expected_tx_airtime(hw, tx_rate, ri,
- band, true, len);
+ band, ampdu, len);
duration /= 1024;

return max_t(u32, duration, 4);
--
2.53.0