]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EHT: Add operating channel width configuration
authorAloka Dixit <quic_alokad@quicinc.com>
Tue, 19 Apr 2022 18:04:04 +0000 (11:04 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 29 Apr 2022 14:28:39 +0000 (17:28 +0300)
Add new configuration options to configure EHT operating channel
width and center frequency.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h
src/ap/ctrl_iface_ap.c

index a3ebfb2bcdeb72cd6c647f3aaf9c404d69cb91f8..b60517db2b35797cc2c15ec9fc3a207643616c5b 100644 (file)
@@ -4701,6 +4701,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
 #ifdef CONFIG_IEEE80211BE
        } else if (os_strcmp(buf, "ieee80211be") == 0) {
                conf->ieee80211be = atoi(pos);
+       } else if (os_strcmp(buf, "eht_oper_chwidth") == 0) {
+               conf->eht_oper_chwidth = atoi(pos);
+       } else if (os_strcmp(buf, "eht_oper_centr_freq_seg0_idx") == 0) {
+               conf->eht_oper_centr_freq_seg0_idx = atoi(pos);
 #endif /* CONFIG_IEEE80211BE */
        } else {
                wpa_printf(MSG_ERROR,
index b24cd6ffb7a7d3eaf2b7f0571855c1d1a26a4de3..64e8cb3e8db46f189af6f7efc6367ce8c68fc0de 100644 (file)
@@ -1000,6 +1000,15 @@ wmm_ac_vo_acm=0
 #disable_11be: Boolean (0/1) to disable EHT for a specific BSS
 #disable_11be=0
 
+# EHT operating channel information; see matching he_* parameters for details.
+# The field eht_oper_centr_freq_seg0_idx field is used to indicate center
+# frequency of 40, 80, and 160 MHz bandwidth operation.
+# In the 6 GHz band, eht_oper_chwidth is ignored and the channel width is
+# derived from the configured operating class (IEEE P802.11be/D1.5,
+# Annex E.1 - Country information and operating classes).
+#eht_oper_chwidth
+#eht_oper_centr_freq_seg0_idx
+
 ##### IEEE 802.1X-2004 related configuration ##################################
 
 # Require IEEE 802.1X authorization
index 05bc380a1e42fb658067572635a7db1db388be86..b6f2ee7010bdb5a2158befbf0b0773f9b542e99f 100644 (file)
@@ -1117,11 +1117,19 @@ struct hostapd_config {
 #endif /* CONFIG_AIRTIME_POLICY */
 
        int ieee80211be;
+#ifdef CONFIG_IEEE80211BE
+       u8 eht_oper_chwidth;
+       u8 eht_oper_centr_freq_seg0_idx;
+#endif /* CONFIG_IEEE80211BE */
 };
 
 
 static inline u8 hostapd_get_oper_chwidth(struct hostapd_config *conf)
 {
+#ifdef CONFIG_IEEE80211BE
+       if (conf->ieee80211be)
+               return conf->eht_oper_chwidth;
+#endif /* CONFIG_IEEE80211BE */
 #ifdef CONFIG_IEEE80211AX
        if (conf->ieee80211ax)
                return conf->he_oper_chwidth;
@@ -1132,6 +1140,10 @@ static inline u8 hostapd_get_oper_chwidth(struct hostapd_config *conf)
 static inline void
 hostapd_set_oper_chwidth(struct hostapd_config *conf, u8 oper_chwidth)
 {
+#ifdef CONFIG_IEEE80211BE
+       if (conf->ieee80211be)
+               conf->eht_oper_chwidth = oper_chwidth;
+#endif /* CONFIG_IEEE80211BE */
 #ifdef CONFIG_IEEE80211AX
        if (conf->ieee80211ax)
                conf->he_oper_chwidth = oper_chwidth;
@@ -1142,6 +1154,10 @@ hostapd_set_oper_chwidth(struct hostapd_config *conf, u8 oper_chwidth)
 static inline u8
 hostapd_get_oper_centr_freq_seg0_idx(struct hostapd_config *conf)
 {
+#ifdef CONFIG_IEEE80211BE
+       if (conf->ieee80211be)
+               return conf->eht_oper_centr_freq_seg0_idx;
+#endif /* CONFIG_IEEE80211BE */
 #ifdef CONFIG_IEEE80211AX
        if (conf->ieee80211ax)
                return conf->he_oper_centr_freq_seg0_idx;
@@ -1153,6 +1169,10 @@ static inline void
 hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
                                     u8 oper_centr_freq_seg0_idx)
 {
+#ifdef CONFIG_IEEE80211BE
+       if (conf->ieee80211be)
+               conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
+#endif /* CONFIG_IEEE80211BE */
 #ifdef CONFIG_IEEE80211AX
        if (conf->ieee80211ax)
                conf->he_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
index 1bc1b0b3bb60086a7b8a5cb747e3f1ab65427c08..00639ae2eccb844c188850c038f3d6aa1e329087 100644 (file)
@@ -765,6 +765,19 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
                return len;
        len += ret;
 
+#ifdef CONFIG_IEEE80211BE
+       if (iface->conf->ieee80211be && !hapd->conf->disable_11be) {
+               ret = os_snprintf(buf + len, buflen - len,
+                                 "eht_oper_chwidth=%d\n"
+                                 "eht_oper_centr_freq_seg0_idx=%d\n",
+                                 iface->conf->eht_oper_chwidth,
+                                 iface->conf->eht_oper_centr_freq_seg0_idx);
+               if (os_snprintf_error(buflen - len, ret))
+                       return len;
+               len += ret;
+       }
+#endif /* CONFIG_IEEE80211BE */
+
 #ifdef CONFIG_IEEE80211AX
        if (iface->conf->ieee80211ax && !hapd->conf->disable_11ax) {
                ret = os_snprintf(buf + len, buflen - len,