Re: [PATCH rtw-next v2 1/3] wifi: rtw88: free the reserved pages of an interface on firmware recovery

From: Luka Gejak

Date: Mon Nov 16 2026 - 11:02:48 EST


Hi Mehmet,

Thanks for the update. Three comments below.

On November 16, 2026 8:20:12 AM GMT+01:00, Mehmet Fide
<mehmet.fide@xxxxxxxxx> wrote:

> @@ -1800,8 +1800,10 @@ void rtw_fw_update_beacon_work(struct work_struct *work)
> + if (!test_bit(RTW_FLAG_RESTARTING, rtwdev->flags)) {
> + rtw_fw_download_rsvd_page(rtwdev);
> + rtw_send_rsvd_page_h2c(rtwdev);
> + }

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.

[ ... ]

> + if (!test_bit(RTW_FLAG_RESTARTING, rtwdev->flags)) {

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?

[ ... ]

> @@ -627,6 +627,7 @@ static void rtw_reset_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
> + rtw_remove_rsvd_page(rtwdev, rtwvif);

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()

The lists are already empty, and mac80211 restart has not begun yet.
This seems to leave a path to the empty reserved page warning.
Could the direct download path be covered too?

Best regards,
Luka Gejak