RE: [PATCH rtw-next v5] wifi: rtw88: pci: wake the TX queues after restart_hw and interface up
From: Ping-Ke Shih
Date: Wed Oct 28 2026 - 01:42:11 EST
Abdurrahman Karadag <abdurrahmankaradag19@xxxxxxxxx> wrote:
> When a TX ring fills, rtw_pci_tx_write() stops the mac80211 queue and
> records it in ring->queue_stopped. The completion loop in
> rtw_pci_tx_isr() is what clears them, and it needs a descriptor to
> complete. If the device goes down first, rtw_pci_dma_release() rewinds
> the indices and frees what was in flight, so nothing is left that
> could. ieee80211_reconfig() does not help either: it wakes only
> IEEE80211_QUEUE_STOP_REASON_SUSPEND, and an interface down/up does not
> reach it at all. TX then stays dead although the device came back.
>
> Reset that state where the device starts, which both
> ieee80211_restart_hw() and an interface down/up reach through
> rtw_core_start(). Gate the wake on ring->queue_stopped so that a
> start which stopped nothing leaves the queues alone. The wake cannot be
> narrowed to the queue the ring-full path stopped: the flag sits on the
> ring, and rtw_tx_queue_mapping() puts management frames and multicast on
> rings of their own whatever queue they came from, so a flag there does
> not name a queue. mac80211 also keeps a single non-refcounted DRIVER
> stop per queue, shared with the scan paths in fw.c, so
> ieee80211_wake_queues() releases whatever holds that slot.
>
> Signed-off-by: Abdurrahman Karadag <abdurrahmankaradag19@xxxxxxxxx>
Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>