]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mt76: flush pending TX before channel switch
authorFelix Fietkau <nbd@nbd.name>
Mon, 9 Mar 2026 06:07:27 +0000 (06:07 +0000)
committerFelix Fietkau <nbd@nbd.name>
Tue, 24 Mar 2026 15:49:31 +0000 (15:49 +0000)
commit0dcef1cbae27d806cd29c296cc03ad6e8ece771d
tree00c3c0a341c2ba853b297ba37c2e39866fbefe4e
parent381733b3a14aaef36b421571c1e99856304311f1
wifi: mt76: flush pending TX before channel switch

mt76_tx() queues frames on wcid->tx_pending for async processing by
tx_worker. In __mt76_set_channel(), the worker gets disabled before it
may have run, and the subsequent wait only checks DMA ring queues, not
the software pending list. This means frames like nullfunc PS frames
from mt76_offchannel_notify() may never be transmitted on the correct
channel.

Fix this by running mt76_txq_schedule_pending() synchronously after
disabling the tx_worker but before setting MT76_RESET, which would
otherwise cause mt76_txq_schedule_pending_wcid() to bail out.

Link: https://patch.msgid.link/20260309060730.87840-8-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/tx.c