]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EHT: 320 MHz DFS support
authorChenming Huang <quic_chenhuan@quicinc.com>
Fri, 14 Jul 2023 02:49:20 +0000 (08:19 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 16 Aug 2023 18:05:58 +0000 (21:05 +0300)
Add support to obtain the start channel when checking whether DFS
is required when using 320 MHz channels.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
src/ap/dfs.c

index e8c5ec9ac24967629eb220641836ba24a7a40e6b..414e546cfe488d994ceb0a5627575ea02c5d73cf 100644 (file)
@@ -362,8 +362,9 @@ static int dfs_get_start_chan_idx(struct hostapd_iface *iface, int *seg1_start)
        if (iface->conf->ieee80211n && iface->conf->secondary_channel == -1)
                channel_no -= 4;
 
-       /* VHT/HE */
-       if (iface->conf->ieee80211ac || iface->conf->ieee80211ax) {
+       /* VHT/HE/EHT */
+       if (iface->conf->ieee80211ac || iface->conf->ieee80211ax ||
+           iface->conf->ieee80211be) {
                switch (hostapd_get_oper_chwidth(iface->conf)) {
                case CONF_OPER_CHWIDTH_USE_HT:
                        break;
@@ -381,9 +382,13 @@ static int dfs_get_start_chan_idx(struct hostapd_iface *iface, int *seg1_start)
                        chan_seg1 = hostapd_get_oper_centr_freq_seg1_idx(
                                iface->conf) - 6;
                        break;
+               case CONF_OPER_CHWIDTH_320MHZ:
+                       channel_no = hostapd_get_oper_centr_freq_seg0_idx(
+                               iface->conf) - 30;
+                       break;
                default:
                        wpa_printf(MSG_INFO,
-                                  "DFS only VHT20/40/80/160/80+80 is supported now");
+                                  "DFS only EHT20/40/80/160/80+80/320 is supported now");
                        channel_no = -1;
                        break;
                }