iwd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] band: fix HT40+/- checks when creating chandef
@ 2023-04-04 15:56 James Prestwood
  2023-04-09 16:36 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2023-04-04 15:56 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood, Alagu Sankar

The HT40+/- flags were reversed when checking against the 802.11
behavior flags.

HT40+ means the secondary channel is above (+) the primary channel
therefore corresponds to the PRIMARY_CHANNEL_LOWER behavior. And
the opposite for HT40-.

Reported-By: Alagu Sankar <alagusankar@gmail.com>
---
 src/band.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/band.c b/src/band.c
index 27b4d174..486df6e1 100644
--- a/src/band.c
+++ b/src/band.c
@@ -1229,11 +1229,11 @@ int band_freq_to_ht_chandef(uint32_t freq, const struct band_freq_attrs *attr,
 			if (band == BAND_FREQ_6_GHZ)
 				break;
 
-			if (info->flags & PRIMARY_CHANNEL_UPPER &&
+			if (info->flags & PRIMARY_CHANNEL_LOWER &&
 						attr->no_ht40_plus)
 				continue;
 
-			if (info->flags & PRIMARY_CHANNEL_LOWER &&
+			if (info->flags & PRIMARY_CHANNEL_UPPER &&
 						attr->no_ht40_minus)
 				continue;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] band: fix HT40+/- checks when creating chandef
  2023-04-04 15:56 [PATCH] band: fix HT40+/- checks when creating chandef James Prestwood
@ 2023-04-09 16:36 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2023-04-09 16:36 UTC (permalink / raw)
  To: James Prestwood, iwd; +Cc: Alagu Sankar

Hi James,

On 4/4/23 10:56, James Prestwood wrote:
> The HT40+/- flags were reversed when checking against the 802.11
> behavior flags.
> 
> HT40+ means the secondary channel is above (+) the primary channel
> therefore corresponds to the PRIMARY_CHANNEL_LOWER behavior. And
> the opposite for HT40-.
> 
> Reported-By: Alagu Sankar <alagusankar@gmail.com>
> ---
>   src/band.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied, thanks.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-09 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04 15:56 [PATCH] band: fix HT40+/- checks when creating chandef James Prestwood
2023-04-09 16:36 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).