From: Johannes Berg <johannes@sipsolutions.net>
To: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH wireless-next v3] wifi: mac80211: consider links for validating SCAN_FLAG_AP in scan request during MLO
Date: Tue, 08 Jul 2025 12:46:53 +0200 [thread overview]
Message-ID: <f5148f63e6f96fd18558dbb7f49d090aec931745.camel@sipsolutions.net> (raw)
In-Reply-To: <20250625-fix_scan_ap_flag_requirement_during_mlo-v3-1-dca408b10ba4@oss.qualcomm.com>
On Wed, 2025-06-25 at 18:31 +0530, Aditya Kumar Singh wrote:
>
> - if (ieee80211_num_beaconing_links(sdata) &&
> - (!(wiphy->features & NL80211_FEATURE_AP_SCAN) ||
> - !(req->flags & NL80211_SCAN_FLAG_AP)))
> - return -EOPNOTSUPP;
> + for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS;
> + link_id++) {
> + link = sdata_dereference(sdata->link[link_id], sdata);
> + if (!link)
> + continue;
for_each_link_data()
> +
> + /* if the link is not beaconing, ignore it */
> + if (!sdata_dereference(link->u.ap.beacon, sdata))
> + continue;
> +
> + /* If we are here then at least one of the link is
> + * beaconing and since radio level information is
> + * not present or single underlying radio is present,
> + * no point in checking further and hence return if
> + * flag requirements are not met.
> + */
> + if (wiphy->n_radio < 2) {
> + if (!(wiphy->features & NL80211_FEATURE_AP_SCAN) ||
> + !(req->flags & NL80211_SCAN_FLAG_AP))
> + return -EOPNOTSUPP;
> +
> + continue;
> + }
Is that _really_ worth special-casing in the scan control path? It's not
like this is a performance question here.
Maybe ieee80211_is_radio_idx_in_scan_req() shouldn't WARN_ON() then or
something, so we can reuse it. Or maybe (better?) just reorder the
checks there, if the chan_radio_idx==-1 and radio_idx==-1 would return
first, and WARN only if we found a scan channel that isn't covered by a
radio?
And <2 seems really strange anyway, ==1 should basically never happen,
it's equivalent to ==0, as in no list of radios?
johannes
next prev parent reply other threads:[~2025-07-08 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 13:01 Aditya Kumar Singh
2025-07-08 10:46 ` Johannes Berg [this message]
2025-07-09 2:47 ` Aditya Kumar Singh
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=f5148f63e6f96fd18558dbb7f49d090aec931745.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=aditya.kumar.singh@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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®