diff mbox series

[v3,2/3] wifi: mac80211: Avoid BSS color collision detection if its disabled

Message ID 20230201065638.25990-3-quic_ramess@quicinc.com (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series wifi: Add support to enable/disable bss color collision detection | expand

Commit Message

Rameshkumar Sundaram Feb. 1, 2023, 6:56 a.m. UTC
Don't detect BSS color collision and send collision events
to userspace if it is disabled.

Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
---
 net/mac80211/rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Johannes Berg Feb. 15, 2023, 5:35 p.m. UTC | #1
On Wed, 2023-02-01 at 12:26 +0530, Rameshkumar Sundaram wrote:
> Don't detect BSS color collision and send collision events
> to userspace if it is disabled.
> 
> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
> ---
>  net/mac80211/rx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index e284897ba5e9..5588067b2af2 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;

And this kind of answers my question on the previous patch ...

???

johannes
Johannes Berg Feb. 15, 2023, 5:37 p.m. UTC | #2
On Wed, 2023-02-01 at 12:26 +0530, Rameshkumar Sundaram wrote:
> Don't detect BSS color collision and send collision events
> to userspace if it is disabled.
> 
> Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
> ---
>  net/mac80211/rx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index e284897ba5e9..5588067b2af2 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;

Also, given this, it seems you should pass this setting down to the
hardware, bss change flag, etc.?

> -	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;

and now that I read this again - clearly that's adding a multi-link
problem. I'd rather not add more of those.

johannes
diff mbox series

Patch

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index e284897ba5e9..5588067b2af2 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;