wifi: mt76: fix stranded frames in mt76_txq_schedule_pending

A wcid is added to phy->tx_list whenever either tx_pending or
tx_offchannel becomes non-empty, but the requeue check after a partial
schedule required BOTH queues to be non-empty. When
mt76_txq_schedule_pending_wcid() returns -1 (queue stopped or
MT76_RESET) it leaves frames in tx_pending while tx_offchannel is empty,
so the wcid is dropped from every scheduling list and its frames stall
until the next mt76_tx() for that wcid or wcid cleanup. This strands
EAPOL/mgmt/nullfunc frames under momentary queue-full or across
scan/channel-switch, causing association and 4-way-handshake timeouts.

Requeue when either queue still holds frames, matching the enqueue
condition.

Fixes: 0b3be9d1d34e ("wifi: mt76: add separate tx scheduling queue for off-channel tx")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2026-07-22 10:51:13 +02:00
parent cdc6c0d07c
commit 41b98d773f
+2 -2
View File
@@ -732,8 +732,8 @@ void mt76_txq_schedule_pending(struct mt76_phy *phy)
ret = mt76_txq_schedule_pending_wcid(phy, wcid, &wcid->tx_pending); ret = mt76_txq_schedule_pending_wcid(phy, wcid, &wcid->tx_pending);
spin_lock(&phy->tx_lock); spin_lock(&phy->tx_lock);
if (!skb_queue_empty(&wcid->tx_pending) && if ((!skb_queue_empty(&wcid->tx_pending) ||
!skb_queue_empty(&wcid->tx_offchannel) && !skb_queue_empty(&wcid->tx_offchannel)) &&
list_empty(&wcid->tx_list)) list_empty(&wcid->tx_list))
list_add_tail(&wcid->tx_list, &phy->tx_list); list_add_tail(&wcid->tx_list, &phy->tx_list);
} }