From: Julius Bairaktaris <julius@bairaktaris.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
"Jeff Johnson" <jjohnson@kernel.org>,
"Baochen Qiang" <baochen.qiang@oss.qualcomm.com>,
"Felix Fietkau" <nbd@nbd.name>,
"Toke Høiland-Jørgensen" <toke@toke.dk>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
ath11k@lists.infradead.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH wireless-next v2 2/7] wifi: mac80211: use the ampdu argument of ieee80211_calc_expected_tx_airtime()
Date: Sat, 28 Nov 2026 17:03:30 +0100 [thread overview]
Message-ID: <20261128160335.1815537-3-julius@bairaktaris.de> (raw)
In-Reply-To: <20261128160335.1815537-1-julius@bairaktaris.de>
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@bairaktaris.de>
---
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
next prev parent reply other threads:[~2026-11-28 16:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 16:03 [PATCH wireless-next v2 0/7] wifi: mac80211: TSO and SG for encap offload, and the TID of 802.3 RX frames Julius Bairaktaris
2026-11-28 16:03 ` [PATCH wireless-next v2 1/7] wifi: mac80211: compute the airtime estimate in 64 bits Julius Bairaktaris
2026-11-28 16:03 ` Julius Bairaktaris [this message]
2026-11-28 16:03 ` [PATCH wireless-next v2 3/7] wifi: mac80211: clamp the AQL airtime estimate before narrowing it Julius Bairaktaris
2026-11-28 16:03 ` [PATCH wireless-next v2 4/7] wifi: mac80211: advertise TSO and SG for encap offloaded frames Julius Bairaktaris
2026-11-28 16:03 ` [PATCH wireless-next v2 5/7] wifi: mac80211: take the TID of an 802.3 frame from the driver Julius Bairaktaris
2026-11-28 16:03 ` [PATCH wireless-next v2 6/7] wifi: ath11k: pass the TID of a received 802.3 frame to mac80211 Julius Bairaktaris
2026-11-28 16:03 ` [PATCH wireless-next v2 7/7] wifi: ath12k: " Julius Bairaktaris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261128160335.1815537-3-julius@bairaktaris.de \
--to=julius@bairaktaris.de \
--cc=ath11k@lists.infradead.org \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=toke@redhat.com \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®