From: Ping-Ke Shih <pkshih@realtek.com>
To: Luka Gejak <luka.gejak@linux.dev>, Mehmet Fide <mehmet.fide@gmail.com>
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mehmet.fide@screeningeagle.com" <mehmet.fide@screeningeagle.com>
Subject: RE: [PATCH rtw-next v12 2/3] wifi: rtw88: support channel switch in AP mode
Date: Thu, 19 Nov 2026 00:51:06 +0000 [thread overview]
Message-ID: <9340ef0716924e229396aa1b595aa458@realtek.com> (raw)
In-Reply-To: <658FDA93-1E44-45D3-BBAA-37FBBAF9954A@linux.dev>
Luka Gejak <luka.gejak@linux.dev> wrote:
> On November 18, 2026 10:14:17 AM GMT+01:00, Ping-Ke Shih
> <pkshih@realtek.com> wrote:
> >Mehmet Fide <mehmet.fide@gmail.com> wrote:
> >> > I think the presence check is better fixed in
> >> > rtw_core_check_sta_active(). Its callback only reads interface state,
> >so
> >> > could it use an atomic interface iterator without allocating entries?
> >>
> >> Right, the callback does not sleep, so rtw_iterate_vifs_atomic() works
> >> there. The check is older than this series: since commit 96fbb84de4ff
> >> ("wifi: rtw88: handle station mode concurrent scan with AP mode") a
> >> failed allocation also makes rtw_clear_op_chan() drop the operating
> >> channel of an associated station, on BSS_CHANGED_BSSID and in
> >> rtw_ops_stop_ap().
> >>
> >> Ping-Ke, Luka: would you take that as a separate fix for rtw-next, or as
> >> a patch before this one in v13?
> >
> >I think rtw_core_check_sta_active() is used under wiphy lock, we can
> >migrate to use for_each_active_interface() with lockdep_assert_wiphy()
> >as a separate patch.
> >
>
> Works for me.
Think more about failing to allocate. I suppose kernel will throw out
a OOM message, so we can just handle the return NULL pointer to prevent
crash. To ensure function still works as normal under OOM situation,
it is not so easy. I guess we need to add many "special conditions",
and driver becomes hard to read.
So, my opinion is to do our best to keep function work under OOM.
No need to ensure everything work perfect.
For this case, it is not too hard to avoid the OOM case, so I agree
the change. But we don't always need to handle the case found by LLM.
Ping-Ke
next prev parent reply other threads:[~2026-11-19 0:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 23:26 [PATCH rtw-next v12 0/3] wifi: rtw88: " Mehmet Fide
2026-11-17 23:26 ` [PATCH rtw-next v12 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-11-17 23:26 ` [PATCH rtw-next v12 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-11-18 7:55 ` Mehmet Fide
2026-11-18 8:19 ` Luka Gejak
2026-11-18 8:33 ` Mehmet Fide
2026-11-18 9:14 ` Ping-Ke Shih
2026-11-18 9:55 ` Luka Gejak
2026-11-19 0:51 ` Ping-Ke Shih [this message]
2026-11-18 9:14 ` Luka Gejak
2026-11-17 23:26 ` [PATCH rtw-next v12 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide
2026-11-18 12:48 ` [PATCH rtw-next v12 0/3] wifi: rtw88: channel switch in AP mode Luka Gejak
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=9340ef0716924e229396aa1b595aa458@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=mehmet.fide@gmail.com \
--cc=mehmet.fide@screeningeagle.com \
--cc=rtl8821cerfe2@gmail.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®