From 8dcc2139ff8f9d767e46bc09276b55e33561cc35 Mon Sep 17 00:00:00 2001 From: Aloka Dixit Date: Tue, 19 Apr 2022 11:04:03 -0700 Subject: [PATCH] EHT: AP mode configuration options to enable/disable the support Add compilation support for IEEE 802.11be along with options to enable EHT support per radio and disable per interface. Enabling HE is mandatory to enable EHT mode. Tested-by: Pradeep Kumar Chitrapu Signed-off-by: Aloka Dixit Signed-off-by: Pradeep Kumar Chitrapu --- hostapd/Android.mk | 5 +++++ hostapd/Makefile | 5 +++++ hostapd/config_file.c | 6 ++++++ hostapd/defconfig | 7 +++++++ hostapd/hostapd.conf | 10 ++++++++++ src/ap/ap_config.c | 16 ++++++++++++++++ src/ap/ap_config.h | 3 +++ wpa_supplicant/Android.mk | 4 ++++ wpa_supplicant/Makefile | 4 ++++ wpa_supplicant/defconfig | 7 +++++++ 10 files changed, 67 insertions(+) diff --git a/hostapd/Android.mk b/hostapd/Android.mk index b89f3a69f..f36957594 100644 --- a/hostapd/Android.mk +++ b/hostapd/Android.mk @@ -294,6 +294,11 @@ ifdef CONFIG_IEEE80211AC L_CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +L_CFLAGS += -DCONFIG_IEEE80211BE +endif + ifdef CONFIG_IEEE80211AX L_CFLAGS += -DCONFIG_IEEE80211AX endif diff --git a/hostapd/Makefile b/hostapd/Makefile index 0f9239052..25d6530d3 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -339,6 +339,11 @@ ifdef CONFIG_IEEE80211AC CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +CFLAGS += -DCONFIG_IEEE80211BE +endif + ifdef CONFIG_IEEE80211AX CFLAGS += -DCONFIG_IEEE80211AX OBJS += ../src/ap/ieee802_11_he.o diff --git a/hostapd/config_file.c b/hostapd/config_file.c index ce29c62f4..a3ebfb2bc 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -4669,6 +4669,8 @@ static int hostapd_config_fill(struct hostapd_config *conf, bss->disable_11ac = !!atoi(pos); } else if (os_strcmp(buf, "disable_11ax") == 0) { bss->disable_11ax = !!atoi(pos); + } else if (os_strcmp(buf, "disable_11be") == 0) { + bss->disable_11be = !!atoi(pos); #ifdef CONFIG_PASN #ifdef CONFIG_TESTING_OPTIONS } else if (os_strcmp(buf, "force_kdk_derivation") == 0) { @@ -4696,6 +4698,10 @@ static int hostapd_config_fill(struct hostapd_config *conf, return 1; } else if (os_strcmp(buf, "rnr") == 0) { bss->rnr = atoi(pos); +#ifdef CONFIG_IEEE80211BE + } else if (os_strcmp(buf, "ieee80211be") == 0) { + conf->ieee80211be = atoi(pos); +#endif /* CONFIG_IEEE80211BE */ } else { wpa_printf(MSG_ERROR, "Line %d: unknown configuration item '%s'", diff --git a/hostapd/defconfig b/hostapd/defconfig index c458e7fa2..a9eab4d9c 100644 --- a/hostapd/defconfig +++ b/hostapd/defconfig @@ -158,6 +158,13 @@ CONFIG_IPV6=y # IEEE 802.11ax HE support #CONFIG_IEEE80211AX=y +# IEEE 802.11be EHT support +# CONFIG_IEEE80211AX is mandatory for setting CONFIG_IEEE80211BE. +# Note: This is experimental and work in progress. The definitions are still +# subject to change and this should not be expected to interoperate with the +# final IEEE 802.11be version. +#CONFIG_IEEE80211BE=y + # Simultaneous Authentication of Equals (SAE), WPA3-Personal #CONFIG_SAE=y diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index 4efb73467..b24cd6ffb 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -990,6 +990,16 @@ wmm_ac_vo_acm=0 # Valid range: 0..20 TUs; default is 0 (disabled) #unsol_bcast_probe_resp_interval=0 +##### IEEE 802.11be related configuration ##################################### + +#ieee80211be: Whether IEEE 802.11be (EHT) is enabled +# 0 = disabled (default) +# 1 = enabled +#ieee80211be=1 + +#disable_11be: Boolean (0/1) to disable EHT for a specific BSS +#disable_11be=0 + ##### IEEE 802.1X-2004 related configuration ################################## # Require IEEE 802.1X authorization diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index 50fea3435..ac0617e3f 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -1435,6 +1435,14 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, } #endif /* CONFIG_FILS */ +#ifdef CONFIG_IEEE80211BE + if (full_config && !bss->disable_11be && bss->disable_11ax) { + bss->disable_11be = true; + wpa_printf(MSG_INFO, + "Disabling IEEE 802.11be as IEEE 802.11ax is disabled for this BSS"); + } +#endif /* CONFIG_IEEE80211BE */ + return 0; } @@ -1510,6 +1518,14 @@ int hostapd_config_check(struct hostapd_config *conf, int full_config) return -1; } +#ifdef CONFIG_IEEE80211BE + if (full_config && conf->ieee80211be && !conf->ieee80211ax) { + wpa_printf(MSG_ERROR, + "Cannot set ieee80211be without ieee80211ax"); + return -1; + } +#endif /* CONFIG_IEEE80211BE */ + for (i = 0; i < conf->num_bss; i++) { if (hostapd_config_check_bss(conf->bss[i], conf, full_config)) return -1; diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index 7d66cd8af..05bc380a1 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -541,6 +541,7 @@ struct hostapd_bss_config { bool disable_11n; bool disable_11ac; bool disable_11ax; + bool disable_11be; /* IEEE 802.11v */ int time_advertisement; @@ -1114,6 +1115,8 @@ struct hostapd_config { unsigned int airtime_update_interval; #define AIRTIME_MODE_MAX (__AIRTIME_MODE_MAX - 1) #endif /* CONFIG_AIRTIME_POLICY */ + + int ieee80211be; }; diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk index ed1f1dc49..bddeaf526 100644 --- a/wpa_supplicant/Android.mk +++ b/wpa_supplicant/Android.mk @@ -933,6 +933,10 @@ OBJS += src/eap_server/eap_server_methods.c ifdef CONFIG_IEEE80211AC L_CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +L_CFLAGS += -DCONFIG_IEEE80211BE +endif ifdef CONFIG_IEEE80211AX L_CFLAGS += -DCONFIG_IEEE80211AX endif diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 12787c0c7..575d22340 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -968,6 +968,10 @@ OBJS += ../src/eap_server/eap_server_methods.o ifdef CONFIG_IEEE80211AC CFLAGS += -DCONFIG_IEEE80211AC endif +ifdef CONFIG_IEEE80211BE +CONFIG_IEEE80211AX=y +CFLAGS += -DCONFIG_IEEE80211BE +endif ifdef CONFIG_IEEE80211AX CFLAGS += -DCONFIG_IEEE80211AX endif diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig index e1de3990c..a4f20d439 100644 --- a/wpa_supplicant/defconfig +++ b/wpa_supplicant/defconfig @@ -486,6 +486,13 @@ CONFIG_IEEE80211AC=y # IEEE 802.11ax HE support (mainly for AP mode) CONFIG_IEEE80211AX=y +# IEEE 802.11be EHT support (mainly for AP mode) +# CONFIG_IEEE80211AX is mandatory for setting CONFIG_IEEE80211BE. +# Note: This is experimental and work in progress. The definitions are still +# subject to change and this should not be expected to interoperate with the +# final IEEE 802.11be version. +#CONFIG_IEEE80211BE=y + # Wireless Network Management (IEEE Std 802.11v-2011) # Note: This is experimental and not complete implementation. #CONFIG_WNM=y