RE: [PATCH rtw-next v4 2/4] wifi: rtw88: report the frames purged from the TX report queue

From: Ping-Ke Shih

Date: Fri Nov 27 2026 - 00:38:59 EST


Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:
> From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
>
> Frames waiting for a TX report of the firmware are freed with
> skb_queue_purge() when the report times out and in rtw_core_deinit().
> mac80211 gets no TX status for them, and the frames it keeps for the
> TX status of user space stay pending until ieee80211_free_hw() warns.
> On an RTL8822CE, after a firmware crash and an unbind:
>
> rtw88_8822ce 0000:01:00.0: failed to get tx report from firmware
> [...]
> Have pending ack frames!
> WARNING: net/mac80211/main.c:1761 at ieee80211_free_ack_frame+0x4c/0x70 [mac80211], CPU#1: sh/24725
> Call trace:
> ieee80211_free_ack_frame+0x4c/0x70 [mac80211] (P)
> idr_for_each+0x6c/0xf4
> ieee80211_free_hw+0x30/0x8c [mac80211]
> rtw_pci_remove+0xd8/0xf0 [rtw88_pci]
>
> Free them with ieee80211_purge_tx_queue() instead, which reports them
> as dropped. Clear the TX status of a frame when it is queued, as
> rtw_tx_report_handle() does, so that a purged frame does not report
> its leftover TX control data as status flags and link ID.
>
> Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver")
> Signed-off-by: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>

Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>