[PATCH ath-next v6 0/9] wifi: ath11k: airtime queue limits, airtime fairness and a driver TXQ scheduler

From: Julius Bairaktaris

Date: Sun Nov 22 2026 - 13:11:56 EST


From: t <t@t>

ath11k sets neither NL80211_EXT_FEATURE_AQL nor
NL80211_EXT_FEATURE_AIRTIME_FAIRNESS, so a saturated download queues
every frame in the hardware TX rings, where there is no AQM. This series
sets both, registers tx and rx airtime, and runs the TXQ scheduler from
the driver and from tx completion.

IPQ8074 AP, TCP download from a wired host to one 1x1 VHT80 station,
default limits, 20 s, three interleaved runs per arm, measured on v5:

Mbit/s sender RTT mean ms
auto rate without 92.9, 94.4, 94.3 111, 232, 231
with 93.7, 88.0, 93.6 124, 51, 167
VHT MCS 0 without 21.4, 22.3, 22.6 587, 550, 526
with 22.9, 22.2, 22.3 44, 42, 43

The v6 changes to 4/9 (the share of a multi-user PPDU) and 8/9 (ending
a round on a full MSDU idr) do not act with one single-user station
below the idr limit, so the table stands for v6. On v6, a routed TCP
download to one HE160 station at 883 to 923 Mbit/s logged no "failed to
transmit frame", six runs with aql_enable set to 0 in debugfs and six
with it set to 1 (IPQ8074 hw2.0, WLAN.HK.2.9.0.1-02146).

On v5, airtime weights are accepted but leave a 2x2 HE160 station at 45
to 49% of the airtime against a 1x1 VHT80 station at 1:1, 4:1 and 1:4,
because the firmware serves every station with frames queued in turn.
Ending the round at 256 MSDUs in flight, as Toke suggested, gives the
HE160 station 65 to 80% at 4:1, but at 1:1 its aggregates shrink from
258 to 100 MSDUs (one run) and the two-station throughput drops by a
third, so the series leaves it out.

An 802.3 frame freed through ieee80211_free_txskb() keeps its station's
pending airtime, because mac80211 looks the station up from an 802.11
header; that is fixed in mac80211 by a separate patch [2].

The series is based on "wifi: ath11k/ath12k: implement TX flow control"
v8 [1], patches 1-3, and applies after them.

I used Claude (Anthropic) to help write these patches.

Changes in v6:
- patch 1: return the frames in flight to mac80211 on firmware recovery
- patch 2: report the tx completion rate on single pdev chips, which
stayed at the 4 us airtime floor
- patch 4: charge each user of a downlink OFDMA or MU-MIMO PPDU its
share of the PPDU duration, the duration divided by num_users, not
the whole duration; reported by Christopher Griffin
- patch 7: register rx airtime under ab->base_lock; mac80211 frees the
station without a grace period after the peer drops it
- patch 8: end a round also when the ring's MSDU idr is full, so no
frame is dequeued only to be dropped; reported by Christopher Griffin
- patch 8: end a round only while a frame is pending, and mark the
access category before reading the pending counts, so a completion
cannot miss the mark
- patch 8: drop the management queue from the commit message; ath11k
has no management TXQ
- rebased onto ath-next 1983b40acfcb
- v5: https://lore.kernel.org/all/20261018174904.1757161-1-julius@xxxxxxxxxxxxxx/

[1] https://lore.kernel.org/all/20261021060725.242681-1-jtornosm@xxxxxxxxxx/
[2] https://lore.kernel.org/all/20261122150541.3117507-1-julius@xxxxxxxxxxxxxx/

Julius Bairaktaris (9):
wifi: ath11k: free tx skbs through ieee80211_free_txskb()
wifi: ath11k: enable airtime queue limits
wifi: ath11k: report the pending tx MSDU count in soc_dp_stats
wifi: ath11k: report tx airtime and enable airtime fairness
wifi: ath11k: schedule TXQs from the driver
wifi: ath11k: run the TXQ scheduler on tx completion
wifi: ath11k: charge received airtime to the station deficit
wifi: ath11k: stop a scheduling round when the hardware is full
wifi: ath11k: budget the tx completion handler

drivers/net/wireless/ath/ath11k/core.c | 1 +
drivers/net/wireless/ath/ath11k/core.h | 7 ++
drivers/net/wireless/ath/ath11k/debugfs.c | 10 ++
drivers/net/wireless/ath/ath11k/dp.c | 11 +-
drivers/net/wireless/ath/ath11k/dp.h | 6 +-
drivers/net/wireless/ath/ath11k/dp_rx.c | 34 +++++-
drivers/net/wireless/ath/ath11k/dp_tx.c | 140 +++++++++++++++++++---
drivers/net/wireless/ath/ath11k/dp_tx.h | 5 +-
drivers/net/wireless/ath/ath11k/mac.c | 105 ++++++++++++++--
drivers/net/wireless/ath/ath11k/mac.h | 1 +
10 files changed, 289 insertions(+), 31 deletions(-)


base-commit: 1983b40acfcb3c3464b291c85977290a785bcfdc
prerequisite-patch-id: ff44eb6f1d673e75bc013e3ffc870d7d30252c17
prerequisite-patch-id: 2cde5e2a788f79e4b8c858a60ec11cd120b1b97e
prerequisite-patch-id: c86d3c9047c851f45b5d46398850c9d810d82258
--
2.53.0