From: Luka Gejak <luka.gejak@linux.dev>
To: linux-wireless@vger.kernel.org,
Mehmet Fide <mehmet.fide@gmail.com>,
Ping-Ke Shih <pkshih@realtek.com>
Cc: Tzu-En Huang <tehuang@realtek.com>,
Yan-Hsuan Chuang <yhchuang@realtek.com>,
Kalle Valo <kvalo@kernel.org>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Brian Norris <briannorris@chromium.org>,
linux-kernel@vger.kernel.org, mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next 3/3] wifi: rtw88: reset the stations outside of RCU on firmware recovery
Date: Fri, 13 Nov 2026 07:57:23 +0100 [thread overview]
Message-ID: <699D1E7C-1793-44A7-AF57-CFE16AD036E6@linux.dev> (raw)
In-Reply-To: <20261111213239.569224-4-mehmet.fide@gmail.com>
Hi Mehmet,
Thanks for the fix. It looks good to me, though I have one small comment
below, but I don't think it should block the patch.
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index ce65a1a80840..8e7ae747b900 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -664,7 +664,7 @@ static void __fw_recovery_work(struct rtw_dev *rtwdev)
> WARN(1, "firmware crash, start reset and recover\n");
>
> rtw_iterate_keys_atomic(rtwdev, NULL, rtw_reset_key_iter, rtwdev);
> - rtw_iterate_stas_atomic(rtwdev, rtw_reset_sta_iter, rtwdev);
> + rtw_iterate_stas(rtwdev, rtw_reset_sta_iter, rtwdev);
> rtw_iterate_vifs_atomic(rtwdev, rtw_reset_vif_iter, rtwdev);
One difference to the atomic iterator: rtw_collect_sta_iter() allocates
an entry per station with GFP_ATOMIC and silently skips the station when
that fails:
stas_entry = kmalloc_obj(*stas_entry, GFP_ATOMIC);
if (!stas_entry)
return;
For the other rtw_iterate_stas() users that only loses one update, but
here it skips rtw_sta_remove(). So if I read it right, the reconfig then
adds that station again with rtw_sta_add(), sta_cnt stays one too high
from then on (rtw8822c_cfo_track() for example resets its tracking unless
sta_cnt is 1), and the old macid of an AP client is never released.
It needs the allocation to fail during a recovery, so it is very
unlikely, and I don't see a simple way around it without the wiphy lock.
Just mentioning it, I am fine with the patch as is.
Reviewed-by: Luka Gejak <luka.gejak@linux.dev>
Best regards,
Luka Gejak
prev parent reply other threads:[~2026-11-13 6:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 21:32 [PATCH rtw-next 0/3] wifi: rtw88: three fixes around the " Mehmet Fide
2026-11-11 21:32 ` [PATCH rtw-next 1/3] wifi: rtw88: free the reserved pages of an interface on " Mehmet Fide
2026-11-13 6:54 ` Luka Gejak
2026-11-11 21:32 ` [PATCH rtw-next 2/3] wifi: rtw88: report the frames purged from the TX report queue Mehmet Fide
2026-11-13 6:55 ` Luka Gejak
2026-11-11 21:32 ` [PATCH rtw-next 3/3] wifi: rtw88: reset the stations outside of RCU on firmware recovery Mehmet Fide
2026-11-13 6:57 ` Luka Gejak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=699D1E7C-1793-44A7-AF57-CFE16AD036E6@linux.dev \
--to=luka.gejak@linux.dev \
--cc=briannorris@chromium.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mehmet.fide@gmail.com \
--cc=mehmet.fide@screeningeagle.com \
--cc=pkshih@realtek.com \
--cc=sgruszka@redhat.com \
--cc=tehuang@realtek.com \
--cc=yhchuang@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®