Re: [PATCH v3 1/2] wifi: rtw88: clear RTW_FLAG_RESTARTING in rtw_ops_stop()
From: Luka Gejak
Date: Sun Nov 08 2026 - 06:41:59 EST
Hi Kalpesh,
Thanks for the new version. One comment below.
November 8, 2026 at 9:51 AM, "Kalpesh Solanki" <skalpesh942@xxxxxxxxx> wrote:
> diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
> index 5e40cf06a9e3..7c86da9e9396 100644
> --- a/drivers/net/wireless/realtek/rtw88/mac80211.c
> +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
> @@ -67,6 +67,7 @@ static void rtw_ops_stop(struct ieee80211_hw *hw, bool suspend)
> struct rtw_dev *rtwdev = hw->priv;
>
> mutex_lock(&rtwdev->mutex);
> + clear_bit(RTW_FLAG_RESTARTING, rtwdev->flags);
> rtw_core_stop(rtwdev);
> mutex_unlock(&rtwdev->mutex);
> }
As far as I can see one case still doesn't get here, and I missed it
when I suggested rtw_ops_stop(). If the restart fails in drv_start(),
local->started is false by the time
cfg80211_shutdown_all_interfaces() closes the interfaces, so drv_stop()
returns early:
if (WARN_ON(!local->started))
return;
So the flag stays set after a failed restart, which seems a likely way
for a recovery to end on hardware that is really stuck. The next time
the interface comes up, recovery would stay blocked until it is stopped
again. Maybe rtw_ops_start() could clear it as well when
rtw_core_start() fails?
Best regards,
Luka Gejak