From: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [RFC v2] cfg80211: Indicate MLO connection info in connect and roam callbacks
Date: Wed, 8 Jun 2022 13:15:01 +0530 [thread overview]
Message-ID: <e75ddf50-348b-eaf2-4033-6a32ef65a41c@quicinc.com> (raw)
In-Reply-To: <a2cc93f959394a3430755d4664d9f2abeabb3ab7.camel@sipsolutions.net>
On 6/8/2022 1:01 PM, Johannes Berg wrote:
> On Mon, 2022-06-06 at 23:01 +0530, Veerendranath Jakkam wrote:
>
>> + if (cr->status == WLAN_STATUS_SUCCESS) {
>> + for_each_valid_link(cr, link) {
>> + if (!cr->links[link].bss)
>> + break;
>> + }
>> +
>> + WARN_ON_ONCE((!cr->valid_links && link != 1) ||
>> + (cr->valid_links &&
>> + link != ARRAY_SIZE(wdev->links)));
>> +
> I will say I'm not super happy with using the link variable after the
> loop, that always feels a bit magic to me, especially if the loop is
> hidden like that...
>
> But I guess I don't see a lot of alternatives here, other than open-
> coding it, or keeping track of "how many BSSes do I have".
Since we need to WARN even if single BSS is not present I think we can
use "bss_not_found" flag?
>
> Actually, for the MLO case, is this even valid? link[14] could be set,
> so you wouldn't break, ending up with link==15? Or am I confused?
In MLO case the link value will be always 15 after loop completes if
bsses are available for all valid links since the check is only for the
valid links
so, In above case also when "link==15" the condition fails and WARN will
be skipped right.
> Anyway, looks good to me.
>
> johannes
next prev parent reply other threads:[~2022-06-08 8:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 17:31 [RFC v2] cfg80211: Indicate MLO connection info in connect and roam callbacks Veerendranath Jakkam
2022-06-08 0:24 ` Jeff Johnson
2022-06-08 7:23 ` Johannes Berg
2022-06-08 7:28 ` Veerendranath Jakkam
2022-06-08 7:31 ` Johannes Berg
2022-06-08 7:45 ` Veerendranath Jakkam [this message]
2022-06-08 7:59 ` Johannes Berg
2022-06-08 8:10 ` Veerendranath Jakkam
2022-06-08 8:11 ` Johannes Berg
2022-06-08 9:57 ` Veerendranath Jakkam
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=e75ddf50-348b-eaf2-4033-6a32ef65a41c@quicinc.com \
--to=quic_vjakkam@quicinc.com \
--cc=johannes@sipsolutions.net \
--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