RE: [PATCH v5 1/3] wifi: rtw88: clear RTW_FLAG_RESTARTING on stop and start failure
From: Zong-Zhe Yang
Date: Fri Nov 13 2026 - 03:53:11 EST
Luka Gejak <luka.gejak@xxxxxxxxx> wrote:
>
> On November 13, 2026 7:52:23 AM GMT+01:00, Zong-Zhe Yang
> <kevin_yang@xxxxxxxxxxx> wrote:
> > In this case, I saw you clear RTW_FLAG_RESTARTING in rtw_ops_stop.
> > However, the reconfig flow might not have even run at that moment.
> >
> > How about clearing RTW_FLAG_RESTARTING when driver gets
> > IEEE80211_RECONFIG_TYPE_SUSPEND?
>
> As far as I can see that misses the stop case. If the last interface goes down
> during a recovery, the restart work finds open_count at 0 and
> mac80211 sends neither RESTART nor SUSPEND, so the flag would stay set.
> Suspend without WoWLAN also goes through drv_stop(), so rtw_ops_stop()
> covers both.
I missed to consider this corner case. My previous point was I don't want
RTW_FLAG_RESTARTING to be cleared too early (assumed open_count != 0).
I don't seem to have other way for this case except by clearing it in drv_stop().
So, keep the code. Thanks.