From 0e520bc273ba6cb91137a19bb86c4b1ef8be43fe Mon Sep 17 00:00:00 2001 From: Aloka Dixit Date: Mon, 20 Sep 2021 13:57:58 -0700 Subject: [PATCH 07/23] eht: support for operating class 137 IEEE P802.11be/D1.4, January 2022, Annex E, section E.1 adds a new value 137 to be used for 320 Mhz bandwidth in 6GHz band. Modify existing functions related to operating class to include this value. Signed-off-by: Aloka Dixit --- src/common/ieee802_11_common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 5b74ddcdf62b..d7f8914e35bf 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -1052,6 +1052,9 @@ enum hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq, case CHANWIDTH_80P80MHZ: *op_class = 135; break; + case CHANWIDTH_320MHZ: + *op_class = 137; + break; default: if (sec_channel) *op_class = 132; @@ -1444,6 +1447,7 @@ static int ieee80211_chan_to_freq_global(u8 op_class, u8 chan) case 133: /* UHB channels, 80 MHz: 7, 23, 39.. */ case 134: /* UHB channels, 160 MHz: 15, 47, 79.. */ case 135: /* UHB channels, 80+80 MHz: 7, 23, 39.. */ + case 137: /* UHB channels, 320 MHz: 31, 63, 95, 127, 159, 191 */ if (chan < 1 || chan > 233) return -1; return 5950 + chan * 5; @@ -2279,7 +2283,11 @@ bool is_6ghz_freq(int freq) bool is_6ghz_op_class(u8 op_class) { +#ifdef CONFIG_IEEE80211BE + return op_class >= 131 && op_class <= 137; +#else return op_class >= 131 && op_class <= 136; +#endif /* CONFIG_IEEE80211BE */ } @@ -2585,6 +2593,8 @@ int op_class_to_bandwidth(u8 op_class) return 160; case 136: /* UHB channels, 20 MHz: 2 */ return 20; + case 137: /* UHB channels, 320 MHz: 31 63 95 127 159 191 */ + return 320; case 180: /* 60 GHz band, channels 1..8 */ return 2160; case 181: /* 60 GHz band, EDMG CB2, channels 9..15 */ @@ -2647,6 +2657,8 @@ int op_class_to_ch_width(u8 op_class) return CHANWIDTH_80P80MHZ; case 136: /* UHB channels, 20 MHz: 2 */ return CHANWIDTH_USE_HT; + case 137: /* 320 MHz: 31 63 95 127 159 191 */ + return CHANWIDTH_320MHZ; case 180: /* 60 GHz band, channels 1..8 */ return CHANWIDTH_2160MHZ; case 181: /* 60 GHz band, EDMG CB2, channels 9..15 */ -- 2.31.1