From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: greearb@candelatech.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Ensure bss-coloring is always configured
Date: Thu, 8 Feb 2024 16:28:58 +0100 [thread overview]
Message-ID: <ZcTzOm5dU9fPfYwC@lore-desk> (raw)
In-Reply-To: <7c2721f79c1d6c0aa914db4f4d6148c8efce4b85.camel@sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 2529 bytes --]
> On Tue, 2024-01-30 at 10:08 -0800, greearb@candelatech.com wrote:
> > From: Ben Greear <greearb@candelatech.com>
> >
> > Old code would not set it to disabled, just assumed that driver
> > would default to disabled. Change this to explicitly request
> > bss color be flushed on initial driver configuration.
>
> Arguably, the current behaviour is in line with the documentation of
> BSS_CHANGED_HE_BSS_COLOR ... but I would tend to agree that
> enabling/disabling coloring should be covered by it as well. Lorenzo?
>
> > And I think the beacon-change logic was slightly wrong, so adjust
> > that as well.
>
> That's not a great thing for a commit message to say ...
>
> > Signed-off-by: Ben Greear <greearb@candelatech.com>
> > ---
> > net/mac80211/cfg.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> > index 1c7fb0959cfd..1a6c6c764cbc 100644
> > --- a/net/mac80211/cfg.c
> > +++ b/net/mac80211/cfg.c
> > @@ -1331,8 +1331,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
> > IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK);
> > changed |= BSS_CHANGED_HE_OBSS_PD;
> >
> > - if (params->beacon.he_bss_color.enabled)
> > - changed |= BSS_CHANGED_HE_BSS_COLOR;
> > + changed |= BSS_CHANGED_HE_BSS_COLOR;
I think we should use beacon->he_bss_color_valid here instead of
params->beacon.he_bss_color.enabled, agree?
> > }
> >
> > if (params->he_cap) {
> > @@ -1512,6 +1511,7 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
> > int err;
> > struct ieee80211_bss_conf *link_conf;
> > u64 changed = 0;
> > + bool color_en;
> >
> > lockdep_assert_wiphy(wiphy);
> >
> > @@ -1549,9 +1549,9 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
> > return err;
> > changed |= err;
> >
> > - if (beacon->he_bss_color_valid &&
> > - beacon->he_bss_color.enabled != link_conf->he_bss_color.enabled) {
> > - link_conf->he_bss_color.enabled = beacon->he_bss_color.enabled;
> > + color_en = beacon->he_bss_color.enabled && beacon->he_bss_color_valid;
> > + if (color_en != link_conf->he_bss_color.enabled) {
> > + link_conf->he_bss_color.enabled = color_en;
> > changed |= BSS_CHANGED_HE_BSS_COLOR;
> > }
this seems fine to me.
Regards,
Lorenzo
> >
>
> Not sure how this isn't updating the color itself, Lorenzo?
>
> johannes
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-02-08 15:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 18:08 [PATCH] mac80211: Ensure bss-coloring is always configured greearb
2024-01-31 11:53 ` Johannes Berg
2024-02-08 15:28 ` Lorenzo Bianconi [this message]
2024-02-08 15:41 ` Ben Greear
2024-02-08 15:55 ` Lorenzo Bianconi
2024-02-08 16:25 ` Ben Greear
2024-02-08 16:44 ` Lorenzo Bianconi
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=ZcTzOm5dU9fPfYwC@lore-desk \
--to=lorenzo@kernel.org \
--cc=greearb@candelatech.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