From: Jeff Johnson <quic_jjohnson@quicinc.com>
To: <greearb@candelatech.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] wifi: mac80211: Improve bss-color configuration.
Date: Fri, 8 Mar 2024 09:40:31 -0800 [thread overview]
Message-ID: <7ab9885b-5fb6-4686-b29b-d287e569293b@quicinc.com> (raw)
In-Reply-To: <20240307181039.3219840-1-greearb@candelatech.com>
On 3/7/2024 10:10 AM, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> Always tell driver to apply bss color settings if beacon indicates
> the bss coloring has been set.
why? please describe the problem you are fixing
>
> And only enable bss coloring if beacon indicates bss color setting
> is valid and also enabled.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> net/mac80211/cfg.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 327682995c92..aaa62c05428c 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -1314,7 +1314,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)
> + if (params->beacon.he_bss_color_valid)
> changed |= BSS_CHANGED_HE_BSS_COLOR;
> }
>
> @@ -1494,6 +1494,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);
>
> @@ -1530,9 +1531,9 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
> if (err < 0)
> return 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;
> }
>
next prev parent reply other threads:[~2024-03-08 17:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 18:10 [PATCH] wifi: mac80211: Improve bss-color configuration greearb
2024-03-08 17:40 ` Jeff Johnson [this message]
2024-03-08 17:44 ` Ben Greear
2024-03-18 22:48 ` 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=7ab9885b-5fb6-4686-b29b-d287e569293b@quicinc.com \
--to=quic_jjohnson@quicinc.com \
--cc=greearb@candelatech.com \
--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