From: Johannes Berg <johannes@sipsolutions.net>
To: "Allen Ye (葉芷勳)" <Allen.Ye@mediatek.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"lorenzo@kernel.org" <lorenzo@kernel.org>
Cc: "lorenzo.bianconi@redhat.com" <lorenzo.bianconi@redhat.com>,
"nbd@nbd.name" <nbd@nbd.name>,
"Evelyn Tsai (蔡珊鈺)" <Evelyn.Tsai@mediatek.com>,
"Money Wang (王信安)" <Money.Wang@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH v2] wifi: mac80211: Update bssid indicator with real BSS numbers
Date: Tue, 23 Apr 2024 13:21:02 +0200 [thread overview]
Message-ID: <757f417d63a750e84ab883b500becc2773e9ff17.camel@sipsolutions.net> (raw)
In-Reply-To: <c23373d71eff81ea043783edff0345502bb2e299.camel@mediatek.com>
On Wed, 2023-12-27 at 09:38 +0000, Allen Ye (葉芷勳) wrote:
> >
> > We should have Lorenzo here, he wrote the original code.
Actually John/Aloka at least also did ... so whatever.
All this only _really_ matters I think when you have EMA, right?
> The number of BSS is not equal to MBSSID element count plus 1 because
> there might be multiple nontransmitted BSSID profile subelements in one
> MBSSID element.
Yes.
Actually it's even more confusing:
> Also, one nontransmitted BSSID profile subelement might
> be fragmented across two MBSSID elements if the length of the
> subelement exceeds 255 octets.
True; however, in this case, a single entry in the
NL80211_ATTR_MBSSID_ELEMS array (and thus in mbssid_ies) must contain
both MBSSID elements together, so it's only counted once still. More
importantly, otherwise we would split them across two frames with EMA,
which is wrong.
So really mbssid_ies / NL80211_ATTR_MBSSID_ELEMS is *not* the list of
MBSSID elements as they should appear in the frame, individually, but an
array of *sets* of MBSSID elements.
For example:
mbssid_ies[0] = mbssid_elem(profile1, profile2), mbssid_elem(profile3)
mbssid_ies[1] = mbssid_elem(profile4_part1), mbssid_elem(profile4_part2)
when you have EMA with periodicity 2, and 4 non-transmitted BSSes where
the first two are small and fit into one element, number 3 is bigger and
needs its own, and number 4 needs to be split ...
> > But this seems fishy to me, if you look into the element itself,
> > you're going to have to do some validation on it?
I stand by this though.
> > And what about fragmentation?
But not this :)
> Whether the subelement is aggregated or fragmented, the MaxBSSID
> Indicator field would be the same for the multiple BSSID set.
Right.
> Therefore, we directly retrieve this field from the element.
Yeah, makes sense.
> For example, there are five BSSes in one multiple BSSID set, one
> transmitted and four non-transmitted BSSes. We might use just two
> MBSSID elements to store all the non-transmitted BSS information. Here
> the MaxBSSID Indicator is 3 in both MBSSID elements. However, the
> element cnt is 2 and if we use the original method to calculate the
> BSSID Indicator we will get 2 which is wrong.
Right.
Anyway, I think I agree, but can you please add some validation of this
to cfg80211 as a first patch, and also document all this better in the
commit message? Optional, but some additional nl80211 documention would
be very nice.
Thanks,
johannes
next prev parent reply other threads:[~2024-04-23 11:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 6:38 [PATCH v2] wifi: mac80211: Update bssid indicator with real BSS numbers Allen Ye
2023-12-14 12:29 ` Johannes Berg
2023-12-27 9:38 ` Allen Ye (葉芷勳)
2024-04-23 11:21 ` Johannes Berg [this message]
2024-04-23 11:28 ` Johannes Berg
2024-05-02 16:45 ` Aloka Dixit
2024-04-23 19:12 ` Jeff Johnson
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=757f417d63a750e84ab883b500becc2773e9ff17.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Allen.Ye@mediatek.com \
--cc=Evelyn.Tsai@mediatek.com \
--cc=Money.Wang@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
/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