[PATCH] EHT: Fix updating center freq segment 0 index for HE and VHT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Added additional check for 6GHz OP class.
Otherwise this results in setting incorrect segment 0 index for 5GHz
40 MHz channel 157--161, which has the same center segment 0 index
159 as 6GHz 320MHz expected channel

Signed-off-by: Mikelis Vuls <mvuls@xxxxxxxxxxxxx>
---
 src/ap/ap_config.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 5699a6be1..a8aafee3c 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1240,7 +1240,8 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
 #ifdef CONFIG_IEEE80211BE
 	if (conf->ieee80211be)
 		conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
-	if (center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4)
+	if (is_6ghz_op_class(conf->op_class) &&
+	    center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4)
 		oper_centr_freq_seg0_idx +=
 			conf->channel > oper_centr_freq_seg0_idx ? 16 : -16;
 #endif /* CONFIG_IEEE80211BE */
-- 
2.17.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux