Skip to contentSkip to conversation

band: fix HT40+/- checks when creating chandef

PATCH Applied James Prestwood 2 participants 2 messages Apr 4, 2023 – Apr 9, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 band: fix HT40+/- checks when creating chandef

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

---
 src/band.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/band.c +2 -2
index 27b4d174..486df6e1 100644
@@ -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;
 
Signature · 1 line
2.25.1
#1 lore raw

Hi James,

Quoted 12 lines · James Prestwood

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

---
  src/band.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Regards,
-Denis