From: Johannes Berg <johannes@sipsolutions.net>
To: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH wireless-next 2/3] wifi: mac80211: Allow scan on a radio while operating on DFS on another radio
Date: Thu, 22 May 2025 13:23:18 +0200 [thread overview]
Message-ID: <f694233ea7378257fbc992bd3d6f10ac7f6d3695.camel@sipsolutions.net> (raw)
In-Reply-To: <a91c82f1-df99-4938-8f41-ce90e9e08ad8@quicinc.com>
On Thu, 2025-05-22 at 16:10 +0530, Raj Kumar Bhagat wrote:
>
> I'm not sure If I fully understood the this comment.
>
> This patch assumes that multiple radios are grouped under a single wiphy.
> Each radio has its own list of frequencies it can scan, and there is no overlap
> in frequencies between any two radios within the same wiphy.
Yeah I guess I'm just overly paranoid due to lack of familiarity with
all the multi-radio things.
> If this assumption holds, then if one radio is operating on a DFS channel and a
> new scan request does not include any frequencies from that radio's list, the
> scan should be allowed—since the DFS radio wouldn't be involved in handling that
> scan request.
Agree.
> > > + for (i = 0; i < scan_req->n_channels; i++) {
> > > + chan = scan_req->channels[i];
> > > + chan_radio_idx = cfg80211_get_radio_idx_by_chan(wiphy, chan);
> > > + /*
> > > + * Skip channels with an invalid radio index and continue
> > > + * checking. If any channel in the scan request matches the
> > > + * given radio index, return true.
> > > + */
> > > + if (chan_radio_idx < 0)
> > > + continue;
> >
> > This seems ... wrong? If there's a channel in the scan request that
> > didn't map to _any_ radio then how are we even scanning there? And the
> > comment seems even stranger, why would we _want_ to ignore it (which it
> > conveniently doesn't answer)?
> >
>
> It seems, (chan_radio_idx < 0) should never be true because the chan is
> taken from the valid scan request. I should remove this check in next version?
I'm not sure, why did you add it? Maybe it should be a WARN_ON and abort
the whole function? It just doesn't seem right to _ignore_.
johannes
next prev parent reply other threads:[~2025-05-22 11:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-14 11:28 [PATCH wireless-next 0/3] wifi: cfg80211/mac80211: Handle simultaneous scan and DFS operations on different radios Raj Kumar Bhagat
2025-05-14 11:28 ` [PATCH wireless-next 1/3] wifi: cfg80211: Add utility API to get radio index from channel Raj Kumar Bhagat
2025-05-16 7:51 ` Johannes Berg
2025-05-16 7:52 ` Johannes Berg
2025-05-22 9:20 ` Raj Kumar Bhagat
2025-05-14 11:28 ` [PATCH wireless-next 2/3] wifi: mac80211: Allow scan on a radio while operating on DFS on another radio Raj Kumar Bhagat
2025-05-16 8:01 ` Johannes Berg
2025-05-22 10:40 ` Raj Kumar Bhagat
2025-05-22 11:23 ` Johannes Berg [this message]
2025-05-27 6:49 ` Raj Kumar Bhagat
2025-05-14 11:28 ` [PATCH wireless-next 3/3] wifi: mac80211: Allow DFS/CSA on a radio if scan is ongoing " Raj Kumar Bhagat
2025-05-16 8:05 ` Johannes Berg
2025-05-22 9:21 ` Raj Kumar Bhagat
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=f694233ea7378257fbc992bd3d6f10ac7f6d3695.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_rajkbhag@quicinc.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®