* [PATCH] wifi: mt76: mt7996: refresh the tx BA session timer on NPU devices
@ 2026-09-18 9:16 Gilly1970
2026-09-19 17:02 ` Lorenzo Bianconi
0 siblings, 1 reply; 2+ messages in thread
From: Gilly1970 @ 2026-09-18 9:16 UTC (permalink / raw)
To: linux-wireless
Cc: nbd, lorenzo, ryder.lee, shayne.chen, sean.wang, linux-kernel,
Chris Scott
From: Chris Scott <gilroyscott1970@gmail.com>
mt7996_mac_add_txs_skb() refreshes mac80211's tx BlockAck session timer
only when a WED device is active. Airoha boards offload through the NPU
instead, so on those the condition is never true and nothing keeps the
timer alive.
NPU-forwarded frames do not traverse mac80211, and the only other places
that stamp tid_tx->last_tx are in the software tx path. When the peer
negotiates a non-zero BlockAck timeout in the ADDBA response (Intel
stations commonly do, most others answer 0) mac80211 arms
tid_tx->session_timer, which then expires in the middle of an offloaded
transfer and tears the session down with a DELBA.
The session does not come back on its own either: mt7996 restarts one
from mt7996_tx_check_aggr(), reached via mt7996_txwi_free(), and
offloaded frames carry no driver token so they never get there.
mac80211's ieee80211_aggr_check() fallback needs
RATE_CTRL_CAPA_AMPDU_TRIGGER, which mt7996 does not set. The reported
symptom is a file transfer to an Intel client dropping from line rate to
a few MB/s and staying there, with a single ping from the router - one
frame on the software path - restoring it instantly.
Extend the check with mt76_npu_device_active(). TXS reports do arrive
for NPU-forwarded frames, measured at roughly 24 per second on a busy
radio, which is far more than a seconds-scale session timer needs.
A second user who independently saw the same collapse, held off only by
a once-a-second ping from the AP, ran a patched image for 100 hours
(~175 TB of offloaded iperf3 traffic, ~4 Gbit/s) without it recurring.
Link: https://forum.openwrt.org/t/quantum-fiber-w1700k-support/222776/3900
Link: https://forum.openwrt.org/t/quantum-fiber-w1700k-support/222776/3901
Link: https://forum.openwrt.org/t/gemtek-w1700k-community-builds/249319/458
Fixes: 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver")
Signed-off-by: Chris Scott <gilroyscott1970@gmail.com>
---
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index dc1a3e9..e50db1f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1540,7 +1540,8 @@ mt7996_mac_add_txs_skb(struct mt7996_dev *dev, struct mt76_wcid *wcid,
}
}
- if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) {
+ if ((mtk_wed_device_active(&dev->mt76.mmio.wed) ||
+ mt76_npu_device_active(&dev->mt76)) && wcid->sta) {
struct ieee80211_sta *sta;
u8 tid;
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] wifi: mt76: mt7996: refresh the tx BA session timer on NPU devices
2026-09-18 9:16 [PATCH] wifi: mt76: mt7996: refresh the tx BA session timer on NPU devices Gilly1970
@ 2026-09-19 17:02 ` Lorenzo Bianconi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Bianconi @ 2026-09-19 17:02 UTC (permalink / raw)
To: Gilly1970
Cc: linux-wireless, nbd, ryder.lee, shayne.chen, sean.wang, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2889 bytes --]
> From: Chris Scott <gilroyscott1970@gmail.com>
>
> mt7996_mac_add_txs_skb() refreshes mac80211's tx BlockAck session timer
> only when a WED device is active. Airoha boards offload through the NPU
> instead, so on those the condition is never true and nothing keeps the
> timer alive.
>
> NPU-forwarded frames do not traverse mac80211, and the only other places
> that stamp tid_tx->last_tx are in the software tx path. When the peer
> negotiates a non-zero BlockAck timeout in the ADDBA response (Intel
> stations commonly do, most others answer 0) mac80211 arms
> tid_tx->session_timer, which then expires in the middle of an offloaded
> transfer and tears the session down with a DELBA.
>
> The session does not come back on its own either: mt7996 restarts one
> from mt7996_tx_check_aggr(), reached via mt7996_txwi_free(), and
> offloaded frames carry no driver token so they never get there.
> mac80211's ieee80211_aggr_check() fallback needs
> RATE_CTRL_CAPA_AMPDU_TRIGGER, which mt7996 does not set. The reported
> symptom is a file transfer to an Intel client dropping from line rate to
> a few MB/s and staying there, with a single ping from the router - one
> frame on the software path - restoring it instantly.
>
> Extend the check with mt76_npu_device_active(). TXS reports do arrive
> for NPU-forwarded frames, measured at roughly 24 per second on a busy
> radio, which is far more than a seconds-scale session timer needs.
>
> A second user who independently saw the same collapse, held off only by
> a once-a-second ping from the AP, ran a patched image for 100 hours
> (~175 TB of offloaded iperf3 traffic, ~4 Gbit/s) without it recurring.
>
> Link: https://forum.openwrt.org/t/quantum-fiber-w1700k-support/222776/3900
> Link: https://forum.openwrt.org/t/quantum-fiber-w1700k-support/222776/3901
> Link: https://forum.openwrt.org/t/gemtek-w1700k-community-builds/249319/458
> Fixes: 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver")
> Signed-off-by: Chris Scott <gilroyscott1970@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
> index dc1a3e9..e50db1f 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
> @@ -1540,7 +1540,8 @@ mt7996_mac_add_txs_skb(struct mt7996_dev *dev, struct mt76_wcid *wcid,
> }
> }
>
> - if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) {
> + if ((mtk_wed_device_active(&dev->mt76.mmio.wed) ||
> + mt76_npu_device_active(&dev->mt76)) && wcid->sta) {
> struct ieee80211_sta *sta;
> u8 tid;
>
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-19 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18 9:16 [PATCH] wifi: mt76: mt7996: refresh the tx BA session timer on NPU devices Gilly1970
2026-09-19 17:02 ` Lorenzo Bianconi
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®