From: Rameshkumar Sundaram <quic_ramess@quicinc.com> To: <johannes@sipsolutions.net>, <ath11k@lists.infradead.org> Cc: <linux-wireless@vger.kernel.org>, Rameshkumar Sundaram <quic_ramess@quicinc.com> Subject: [PATCH 1/2] nl80211: add support to enable/disable bss color collision detection Date: Mon, 26 Dec 2022 14:03:27 +0530 [thread overview] Message-ID: <20221226083328.29051-2-quic_ramess@quicinc.com> (raw) In-Reply-To: <20221226083328.29051-1-quic_ramess@quicinc.com> As per 802.11ax-2021, STAs shall process BSS Color Change Announcement (BCCA) from AP and switch to new color, but some STAs aren't processing BCCA from AP and not doing color switch, causing them to drop data frames from AP post color change. Provide an option to disable color collision detection and therefore not to do BCCA to mitigate the same from AP. If it's required in case where STA supports BCCA handling, then it can enabled in AP using this option. Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> --- include/net/cfg80211.h | 2 ++ include/uapi/linux/nl80211.h | 3 +++ net/mac80211/rx.c | 3 ++- net/wireless/nl80211.c | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 03d4f4deadae..153a05a25d91 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -304,11 +304,13 @@ struct ieee80211_he_obss_pd { * @color: the current color. * @enabled: HE BSS color is used * @partial: define the AID equation. + * @collision_detection_enabled: HE BSS color collision detection is enabled. */ struct cfg80211_he_bss_color { u8 color; bool enabled; bool partial; + bool collision_detection_enabled; }; /** diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index c14a91bbca7c..ec514669d203 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -7440,6 +7440,8 @@ enum nl80211_obss_pd_attributes { * @NL80211_HE_BSS_COLOR_ATTR_COLOR: the current BSS Color. * @NL80211_HE_BSS_COLOR_ATTR_DISABLED: is BSS coloring disabled. * @NL80211_HE_BSS_COLOR_ATTR_PARTIAL: the AID equation to be used.. + * @NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED: is BSS + * color collision detection disabled. * * @__NL80211_HE_BSS_COLOR_ATTR_LAST: Internal * @NL80211_HE_BSS_COLOR_ATTR_MAX: highest BSS Color attribute. @@ -7450,6 +7452,7 @@ enum nl80211_bss_color_attributes { NL80211_HE_BSS_COLOR_ATTR_COLOR, NL80211_HE_BSS_COLOR_ATTR_DISABLED, NL80211_HE_BSS_COLOR_ATTR_PARTIAL, + NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED, /* keep last */ __NL80211_HE_BSS_COLOR_ATTR_LAST, diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 7e3ab6e1b28f..382f467f0e31 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3195,7 +3195,8 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx) if (ieee80211_hw_check(&rx->local->hw, DETECTS_COLOR_COLLISION)) return; - if (rx->sdata->vif.bss_conf.csa_active) + if (rx->sdata->vif.bss_conf.csa_active || + !rx->sdata->vif.bss_conf.he_bss_color.collision_detection_enabled) return; baselen = mgmt->u.beacon.variable - rx->skb->data; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 33a82ecab9d5..8db437995e53 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -377,6 +377,7 @@ he_bss_color_policy[NL80211_HE_BSS_COLOR_ATTR_MAX + 1] = { [NL80211_HE_BSS_COLOR_ATTR_COLOR] = NLA_POLICY_RANGE(NLA_U8, 1, 63), [NL80211_HE_BSS_COLOR_ATTR_DISABLED] = { .type = NLA_FLAG }, [NL80211_HE_BSS_COLOR_ATTR_PARTIAL] = { .type = NLA_FLAG }, + [NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED] = { .type = NLA_FLAG }, }; static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = { @@ -5414,6 +5415,8 @@ static int nl80211_parse_he_bss_color(struct nlattr *attrs, !nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_DISABLED]); he_bss_color->partial = nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_PARTIAL]); + he_bss_color->collision_detection_enabled = + !nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED]); return 0; } base-commit: 44bacbdf9066c590423259dbd6d520baac99c1a8 -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Rameshkumar Sundaram <quic_ramess@quicinc.com> To: <johannes@sipsolutions.net>, <ath11k@lists.infradead.org> Cc: <linux-wireless@vger.kernel.org>, Rameshkumar Sundaram <quic_ramess@quicinc.com> Subject: [PATCH 1/2] nl80211: add support to enable/disable bss color collision detection Date: Mon, 26 Dec 2022 14:03:27 +0530 [thread overview] Message-ID: <20221226083328.29051-2-quic_ramess@quicinc.com> (raw) In-Reply-To: <20221226083328.29051-1-quic_ramess@quicinc.com> As per 802.11ax-2021, STAs shall process BSS Color Change Announcement (BCCA) from AP and switch to new color, but some STAs aren't processing BCCA from AP and not doing color switch, causing them to drop data frames from AP post color change. Provide an option to disable color collision detection and therefore not to do BCCA to mitigate the same from AP. If it's required in case where STA supports BCCA handling, then it can enabled in AP using this option. Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com> --- include/net/cfg80211.h | 2 ++ include/uapi/linux/nl80211.h | 3 +++ net/mac80211/rx.c | 3 ++- net/wireless/nl80211.c | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 03d4f4deadae..153a05a25d91 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -304,11 +304,13 @@ struct ieee80211_he_obss_pd { * @color: the current color. * @enabled: HE BSS color is used * @partial: define the AID equation. + * @collision_detection_enabled: HE BSS color collision detection is enabled. */ struct cfg80211_he_bss_color { u8 color; bool enabled; bool partial; + bool collision_detection_enabled; }; /** diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index c14a91bbca7c..ec514669d203 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -7440,6 +7440,8 @@ enum nl80211_obss_pd_attributes { * @NL80211_HE_BSS_COLOR_ATTR_COLOR: the current BSS Color. * @NL80211_HE_BSS_COLOR_ATTR_DISABLED: is BSS coloring disabled. * @NL80211_HE_BSS_COLOR_ATTR_PARTIAL: the AID equation to be used.. + * @NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED: is BSS + * color collision detection disabled. * * @__NL80211_HE_BSS_COLOR_ATTR_LAST: Internal * @NL80211_HE_BSS_COLOR_ATTR_MAX: highest BSS Color attribute. @@ -7450,6 +7452,7 @@ enum nl80211_bss_color_attributes { NL80211_HE_BSS_COLOR_ATTR_COLOR, NL80211_HE_BSS_COLOR_ATTR_DISABLED, NL80211_HE_BSS_COLOR_ATTR_PARTIAL, + NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED, /* keep last */ __NL80211_HE_BSS_COLOR_ATTR_LAST, diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 7e3ab6e1b28f..382f467f0e31 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3195,7 +3195,8 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx) if (ieee80211_hw_check(&rx->local->hw, DETECTS_COLOR_COLLISION)) return; - if (rx->sdata->vif.bss_conf.csa_active) + if (rx->sdata->vif.bss_conf.csa_active || + !rx->sdata->vif.bss_conf.he_bss_color.collision_detection_enabled) return; baselen = mgmt->u.beacon.variable - rx->skb->data; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 33a82ecab9d5..8db437995e53 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -377,6 +377,7 @@ he_bss_color_policy[NL80211_HE_BSS_COLOR_ATTR_MAX + 1] = { [NL80211_HE_BSS_COLOR_ATTR_COLOR] = NLA_POLICY_RANGE(NLA_U8, 1, 63), [NL80211_HE_BSS_COLOR_ATTR_DISABLED] = { .type = NLA_FLAG }, [NL80211_HE_BSS_COLOR_ATTR_PARTIAL] = { .type = NLA_FLAG }, + [NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED] = { .type = NLA_FLAG }, }; static const struct nla_policy nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = { @@ -5414,6 +5415,8 @@ static int nl80211_parse_he_bss_color(struct nlattr *attrs, !nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_DISABLED]); he_bss_color->partial = nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_PARTIAL]); + he_bss_color->collision_detection_enabled = + !nla_get_flag(tb[NL80211_HE_BSS_COLOR_ATTR_COLLISION_DETECTION_DISABLED]); return 0; } base-commit: 44bacbdf9066c590423259dbd6d520baac99c1a8 -- 2.17.1 -- ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2022-12-26 8:34 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-26 8:33 [PATCH 0/2] wifi: Add support to enable/disable bss color collision detection Rameshkumar Sundaram 2022-12-26 8:33 ` Rameshkumar Sundaram 2022-12-26 8:33 ` Rameshkumar Sundaram [this message] 2022-12-26 8:33 ` [PATCH 1/2] nl80211: add " Rameshkumar Sundaram 2023-01-19 14:02 ` Johannes Berg 2023-01-19 14:02 ` Johannes Berg 2023-01-19 14:52 ` Nicolas Cavallari 2023-01-19 14:52 ` Nicolas Cavallari 2023-01-19 14:54 ` Johannes Berg 2023-01-19 14:54 ` Johannes Berg 2023-01-19 18:36 ` Lorenzo Bianconi 2023-01-19 18:36 ` Lorenzo Bianconi 2023-01-20 15:55 ` Lorenzo Bianconi 2023-01-20 15:55 ` Lorenzo Bianconi 2023-01-20 16:10 ` Nicolas Cavallari 2023-01-20 16:10 ` Nicolas Cavallari 2023-01-24 11:13 ` Nicolas Cavallari 2023-01-24 11:13 ` Nicolas Cavallari 2023-01-24 14:09 ` Lorenzo Bianconi 2023-01-24 14:09 ` Lorenzo Bianconi 2023-01-23 4:57 ` Rameshkumar Sundaram (QUIC) 2023-01-23 4:57 ` Rameshkumar Sundaram (QUIC) 2022-12-26 8:33 ` [PATCH 2/2] ath11k: add support to enable/disable BSS " Rameshkumar Sundaram 2022-12-26 8:33 ` Rameshkumar Sundaram
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=20221226083328.29051-2-quic_ramess@quicinc.com \ --to=quic_ramess@quicinc.com \ --cc=ath11k@lists.infradead.org \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.