diff mbox series

AP: Allow downgrading to 20MHz based on OBSS results

Message ID 1578531214-12314-1-git-send-email-alokad@codeaurora.org
State Changes Requested
Headers show
Series AP: Allow downgrading to 20MHz based on OBSS results | expand

Commit Message

Aloka Dixit Jan. 9, 2020, 12:53 a.m. UTC
Before operating on 40MHz in 2.4GHz, AP looks for overlapping
BSS in neighboring channels. Upon OBSS detection, AP should
downgrade to 20MHz bandwidth. This decistion is broken now
for HE40. As of now ieee80211n_check_scan skips the rollback
step for 20MHz as allowed_ht40_channel_pair returns true
when primary and secondary channels are same. Fix that.

Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
---
 src/common/hw_features_common.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Aloka Dixit Jan. 14, 2020, 7:11 p.m. UTC | #1
Hi,
Please drop following patch as it is causing a regression.
I will send the next version.
Thanks.

On 2020-01-08 16:53, Aloka Dixit wrote:
> Before operating on 40MHz in 2.4GHz, AP looks for overlapping
> BSS in neighboring channels. Upon OBSS detection, AP should
> downgrade to 20MHz bandwidth. This decistion is broken now
> for HE40. As of now ieee80211n_check_scan skips the rollback
> step for 20MHz as allowed_ht40_channel_pair returns true
> when primary and secondary channels are same. Fix that.
> 
> Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
> ---
>  src/common/hw_features_common.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/common/hw_features_common.c 
> b/src/common/hw_features_common.c
> index 19593a521f9e..d691cc939b2b 100644
> --- a/src/common/hw_features_common.c
> +++ b/src/common/hw_features_common.c
> @@ -111,7 +111,12 @@ int allowed_ht40_channel_pair(enum hostapd_hw_mode 
> mode,
> 
>  	ht40_plus = pri_chan < sec_chan;
> 
> -	if (pri_chan == sec_chan || !sec_chan) {
> +	/* If primary and secondary channels are set to same value,
> +	 * operating width should be changed to 20MHz. */
> +	if (pri_chan == sec_chan)
> +		return 0;
> +
> +	if(!sec_chan) {
>  		if (chan_pri_allowed(p_chan))
>  			return 1; /* HT40 not used */
diff mbox series

Patch

diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
index 19593a521f9e..d691cc939b2b 100644
--- a/src/common/hw_features_common.c
+++ b/src/common/hw_features_common.c
@@ -111,7 +111,12 @@  int allowed_ht40_channel_pair(enum hostapd_hw_mode mode,
 
 	ht40_plus = pri_chan < sec_chan;
 
-	if (pri_chan == sec_chan || !sec_chan) {
+	/* If primary and secondary channels are set to same value,
+	 * operating width should be changed to 20MHz. */
+	if (pri_chan == sec_chan)
+		return 0;
+
+	if(!sec_chan) {
 		if (chan_pri_allowed(p_chan))
 			return 1; /* HT40 not used */