Re: [PATCH rtw-next v2 1/3] wifi: rtw88: free the reserved pages of an interface on firmware recovery
From: Mehmet Fide
Date: Tue Nov 17 2026 - 12:05:25 EST
Hi Luka,
> Could a skipped TIM update be retried at reconfig_complete()? After
> reconfig's last beacon download, sta_info_cleanup() can still expire a
> buffered frame and queue this work. If it runs before the flag clears,
> the beacon keeps the old TIM bit.
Yes, that update was lost. v3 drops the RTW_FLAG_RESTARTING test from
the work. Instead rtw_fw_download_rsvd_page() and
rtw_send_rsvd_page_h2c() do nothing while no port is in use: the
recovery clears the ports with the pages, and rtw_ops_add_interface()
sets them again. With a test build that queues the work during the
reconfiguration, v2 skipped the download and v3 did it.
> Also, if the last interface closes before restart work takes the wiphy
> lock, open_count is zero and reconfig_complete() is skipped. The flag
> survives normal reopening, so the worker still skips TIM updates.
> Could that exit be covered too?
With the interface closed in that window, the flag stayed set after
reopening, and writing fw_crash returned -EINPROGRESS; rtw_fw_recovery()
would ignore a real crash the same way. The pages no longer depend on
the flag in v3, and a new patch clears it in rtw_ops_stop().
> As far as I can see, rtw_core_stop() drops the driver mutex without
> holding wiphy. A concurrent beacon change can then reach:
>
> ieee80211_change_beacon()
> rtw_ops_bss_info_changed()
> rtw_fw_download_rsvd_page()
Two hostapd update_beacon calls in that window warned twice with v2.
The port test covers this path as well, and v3 did not warn.
Mehmet