wifi: mt76: mt7996: refresh the tx BA session timer on NPU devices
Subsystems (2)
PATCH 1/1 wifi: mt76: mt7996: refresh the tx BA session timer on NPU devices
From: Chris Scott <[email protected]>
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.
--- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7996/mac.c +2 -1
@@ -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;
Signature · 1 line
2.43.0
Quoted 31 lines
From: Chris Scott <[email protected]>
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_txare 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 armstid_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 viamt7996_txwi_free(), and offloaded frames carry no driver token so they never get there. mac80211'sieee80211_aggr_check()fallback needsRATE_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.
Quoted 5 lines
Fixes 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver")Signed-off-by Chris Scott <[email protected]>
Quoted 21 lines
--- drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/wireless/mediatek/mt76/mt7996/mac.c +2
-1@@ -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;Signature · 1 line
2.43.0