mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-18 18:01:23 +00:00
581 lines
19 KiB
Diff
581 lines
19 KiB
Diff
From 1194cfc2d5835f2cb64b94eaae4431f3995fdc60 Mon Sep 17 00:00:00 2001
|
|
From: Aloka Dixit <quic_alokad@quicinc.com>
|
|
Date: Mon, 28 Jun 2021 13:30:29 -0700
|
|
Subject: [PATCH] eht: configuration options to enable/disable the support
|
|
|
|
Add compilation for flag 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 <quic_pradeepc@quicinc.com>
|
|
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
|
|
---
|
|
hostapd/Makefile | 4 ++++
|
|
hostapd/config_file.c | 6 ++++++
|
|
hostapd/hostapd.conf | 10 ++++++++++
|
|
src/ap/ap_config.c | 17 +++++++++++++++++
|
|
src/ap/ap_config.h | 2 ++
|
|
src/ap/ctrl_iface_ap.c | 5 ++++-
|
|
src/ap/sta_info.c | 7 ++++---
|
|
src/ap/sta_info.h | 2 +-
|
|
src/common/hw_features_common.c | 2 ++
|
|
src/drivers/driver.h | 7 +++++++
|
|
src/drivers/driver_nl80211.c | 14 ++++++++++++--
|
|
wpa_supplicant/Makefile | 11 +++++++++++
|
|
wpa_supplicant/ap.c | 5 +++++
|
|
wpa_supplicant/config.c | 4 ++++
|
|
wpa_supplicant/config_file.c | 3 +++
|
|
wpa_supplicant/config_ssid.h | 12 ++++++++++++
|
|
wpa_supplicant/ctrl_iface.c | 7 ++++---
|
|
wpa_supplicant/events.c | 2 ++
|
|
wpa_supplicant/sme.c | 3 +++
|
|
wpa_supplicant/wpa_cli.c | 3 +++
|
|
wpa_supplicant/wpa_supplicant.c | 39 +++++++++++++++++++++++++++++++++++++--
|
|
wpa_supplicant/wpa_supplicant_i.h | 4 ++++
|
|
22 files changed, 157 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/hostapd/Makefile b/hostapd/Makefile
|
|
index 002d68833c46..bf7d250fe6c6 100644
|
|
--- a/hostapd/Makefile
|
|
+++ b/hostapd/Makefile
|
|
@@ -349,6 +349,10 @@ CFLAGS += -DCONFIG_IEEE80211AX
|
|
OBJS += ../src/ap/ieee802_11_he.o
|
|
endif
|
|
|
|
+ifdef CONFIG_IEEE80211BE
|
|
+CFLAGS += -DCONFIG_IEEE80211BE
|
|
+endif
|
|
+
|
|
ifdef CONFIG_MBO
|
|
CFLAGS += -DCONFIG_MBO
|
|
OBJS += ../src/ap/mbo_ap.o
|
|
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
|
|
index 340eb4874f70..a928beb6dfe8 100644
|
|
--- a/hostapd/config_file.c
|
|
+++ b/hostapd/config_file.c
|
|
@@ -4622,6 +4622,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);
|
|
} else if (os_strcmp(buf, "beacon_tx_mode") == 0) {
|
|
int val = atoi(pos);
|
|
|
|
@@ -4662,6 +4664,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
|
conf->mbssid = atoi(pos);
|
|
} else if (os_strcmp(buf, "ema") == 0) {
|
|
conf->ema = 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/hostapd.conf b/hostapd/hostapd.conf
|
|
index 3303679211f5..9d35e0bcd49f 100644
|
|
--- a/hostapd/hostapd.conf
|
|
+++ b/hostapd/hostapd.conf
|
|
@@ -996,6 +996,16 @@ wmm_ac_vo_acm=0
|
|
# 1 = Enabled
|
|
#ema=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 4ceb4803af5e..f036eb663c99 100644
|
|
--- a/src/ap/ap_config.c
|
|
+++ b/src/ap/ap_config.c
|
|
@@ -1435,6 +1435,15 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
|
|
}
|
|
#endif /* CONFIG_FILS */
|
|
|
|
+#ifdef CONFIG_IEEE80211BE
|
|
+ if (full_config && bss->disable_11be == false &&
|
|
+ bss->disable_11ax == true) {
|
|
+ bss->disable_11be = true;
|
|
+ wpa_printf(MSG_ERROR,
|
|
+ "Disabling IEEE 802.11be as IEEE 802.11ax is disabled for this BSS");
|
|
+ }
|
|
+#endif /* CONFIG_IEEE80211BE */
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
@@ -1508,6 +1517,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 ebcca548d8cd..0bf8ca345172 100644
|
|
--- a/src/ap/ap_config.h
|
|
+++ b/src/ap/ap_config.h
|
|
@@ -537,6 +537,7 @@ struct hostapd_bss_config {
|
|
bool disable_11n;
|
|
bool disable_11ac;
|
|
bool disable_11ax;
|
|
+ bool disable_11be;
|
|
|
|
/* IEEE 802.11v */
|
|
int time_advertisement;
|
|
@@ -1127,6 +1128,7 @@ struct hostapd_config {
|
|
#endif /* CONFIG_AIRTIME_POLICY */
|
|
u8 mbssid;
|
|
u8 ema;
|
|
+ int ieee80211be;
|
|
};
|
|
|
|
static inline u8 hostapd_get_he_6ghz_reg_pwr_type(struct hostapd_config *conf)
|
|
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
|
|
index e63cbf72dc54..c58715e8b765 100644
|
|
--- a/src/ap/ctrl_iface_ap.c
|
|
+++ b/src/ap/ctrl_iface_ap.c
|
|
@@ -331,7 +331,7 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
|
|
return len;
|
|
len += ret;
|
|
|
|
- ret = ap_sta_flags_txt(sta->flags, buf + len, buflen - len);
|
|
+ ret = ap_sta_flags_txt(sta->flags, sta->flags_ext, buf + len, buflen - len);
|
|
if (ret < 0)
|
|
return len;
|
|
len += ret;
|
|
@@ -1040,6 +1040,7 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
|
|
"ieee80211n=%d\n"
|
|
"ieee80211ac=%d\n"
|
|
"ieee80211ax=%d\n"
|
|
+ "ieee80211be=%d\n"
|
|
"beacon_int=%u\n"
|
|
"dtim_period=%d\n",
|
|
iface->conf->channel,
|
|
@@ -1052,6 +1053,8 @@ int hostapd_ctrl_iface_status(struct hostapd_data *hapd, char *buf,
|
|
!hapd->conf->disable_11ac,
|
|
iface->conf->ieee80211ax &&
|
|
!hapd->conf->disable_11ax,
|
|
+ iface->conf->ieee80211be &&
|
|
+ !hapd->conf->disable_11be,
|
|
iface->conf->beacon_int,
|
|
hapd->conf->dtim_period);
|
|
if (os_snprintf_error(buflen - len, ret))
|
|
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
|
|
index 33ba7b8c5e66..0d446a7498e0 100644
|
|
--- a/src/ap/sta_info.c
|
|
+++ b/src/ap/sta_info.c
|
|
@@ -1454,13 +1454,13 @@ void ap_sta_clear_disconnect_timeouts(struct hostapd_data *hapd,
|
|
}
|
|
|
|
|
|
-int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen)
|
|
+int ap_sta_flags_txt(u32 flags, u32 flags_ext, char *buf, size_t buflen)
|
|
{
|
|
int res;
|
|
|
|
buf[0] = '\0';
|
|
res = os_snprintf(buf, buflen,
|
|
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
|
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
|
(flags & WLAN_STA_AUTH ? "[AUTH]" : ""),
|
|
(flags & WLAN_STA_ASSOC ? "[ASSOC]" : ""),
|
|
(flags & WLAN_STA_AUTHORIZED ? "[AUTHORIZED]" : ""),
|
|
@@ -1483,7 +1483,8 @@ int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen)
|
|
(flags & WLAN_STA_6GHZ ? "[6GHZ]" : ""),
|
|
(flags & WLAN_STA_VENDOR_VHT ? "[VENDOR_VHT]" : ""),
|
|
(flags & WLAN_STA_WNM_SLEEP_MODE ?
|
|
- "[WNM_SLEEP_MODE]" : ""));
|
|
+ "[WNM_SLEEP_MODE]" : ""),
|
|
+ (flags_ext & WLAN_STA_EXT_EHT ? "[EHT]" : ""));
|
|
if (os_snprintf_error(buflen, res))
|
|
res = -1;
|
|
|
|
diff --git a/src/ap/sta_info.h b/src/ap/sta_info.h
|
|
index cac4318acafe..ec898bd15e1b 100644
|
|
--- a/src/ap/sta_info.h
|
|
+++ b/src/ap/sta_info.h
|
|
@@ -401,7 +401,7 @@ void ap_sta_disassoc_cb(struct hostapd_data *hapd, struct sta_info *sta);
|
|
void ap_sta_clear_disconnect_timeouts(struct hostapd_data *hapd,
|
|
struct sta_info *sta);
|
|
|
|
-int ap_sta_flags_txt(u32 flags, char *buf, size_t buflen);
|
|
+int ap_sta_flags_txt(u32 flags, u32 flags_ext, char *buf, size_t buflen);
|
|
void ap_sta_delayed_1x_auth_fail_disconnect(struct hostapd_data *hapd,
|
|
struct sta_info *sta);
|
|
int ap_sta_pending_delayed_1x_auth_fail_disconnect(struct hostapd_data *hapd,
|
|
diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
|
|
index 539b40555ca9..d99cf606911c 100644
|
|
--- a/src/common/hw_features_common.c
|
|
+++ b/src/common/hw_features_common.c
|
|
@@ -390,6 +390,8 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
|
|
{
|
|
if (!he_cap || !he_cap->he_supported)
|
|
he_enabled = 0;
|
|
+ if (!eht_cap || !eht_cap->eht_supported)
|
|
+ eht_enabled = 0;
|
|
os_memset(data, 0, sizeof(*data));
|
|
data->mode = mode;
|
|
data->freq = freq;
|
|
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
|
|
index ef86419fa5c9..01dab4dfdb78 100644
|
|
--- a/src/drivers/driver.h
|
|
+++ b/src/drivers/driver.h
|
|
@@ -1133,6 +1133,13 @@ struct wpa_driver_associate_params {
|
|
int disable_he;
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ /**
|
|
+ * disable_eht - Disable EHT for this connection
|
|
+ */
|
|
+ int disable_eht;
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
+
|
|
/**
|
|
* req_key_mgmt_offload - Request key management offload for connection
|
|
*
|
|
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
|
|
index a8faf5193287..c79594399ce6 100644
|
|
--- a/src/drivers/driver_nl80211.c
|
|
+++ b/src/drivers/driver_nl80211.c
|
|
@@ -4969,6 +4969,7 @@ static int nl80211_put_freq_params(struct nl_msg *msg,
|
|
if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq->freq))
|
|
return -ENOBUFS;
|
|
|
|
+ wpa_printf(MSG_DEBUG, " * eht_enabled=%d", freq->eht_enabled);
|
|
wpa_printf(MSG_DEBUG, " * he_enabled=%d", freq->he_enabled);
|
|
wpa_printf(MSG_DEBUG, " * vht_enabled=%d", freq->vht_enabled);
|
|
wpa_printf(MSG_DEBUG, " * ht_enabled=%d", freq->ht_enabled);
|
|
@@ -5061,9 +5062,10 @@ static int nl80211_set_channel(struct i802_bss *bss,
|
|
int ret;
|
|
|
|
wpa_printf(MSG_DEBUG,
|
|
- "nl80211: Set freq %d (ht_enabled=%d, vht_enabled=%d, he_enabled=%d, bandwidth=%d MHz, cf1=%d MHz, cf2=%d MHz)",
|
|
+ "nl80211: Set freq %d (ht_enabled=%d, vht_enabled=%d, he_enabled=%d, eht_enabled=%d, bandwidth=%d MHz, cf1=%d MHz, cf2=%d MHz)",
|
|
freq->freq, freq->ht_enabled, freq->vht_enabled, freq->he_enabled,
|
|
- freq->bandwidth, freq->center_freq1, freq->center_freq2);
|
|
+ freq->eht_enabled, freq->bandwidth, freq->center_freq1,
|
|
+ freq->center_freq2);
|
|
|
|
msg = nl80211_bss_msg(bss, 0, set_chan ? NL80211_CMD_SET_CHANNEL :
|
|
NL80211_CMD_SET_WIPHY);
|
|
@@ -6042,6 +6044,14 @@ static int nl80211_ht_vht_overrides(struct nl_msg *msg,
|
|
}
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ if (params->disable_eht) {
|
|
+ wpa_printf(MSG_DEBUG, " * EHT disabled");
|
|
+ if (nla_put_flag(msg, NL80211_ATTR_DISABLE_EHT))
|
|
+ return -1;
|
|
+ }
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
|
|
index 4c6592b62f5b..b5015c3f4019 100644
|
|
--- a/wpa_supplicant/Makefile
|
|
+++ b/wpa_supplicant/Makefile
|
|
@@ -193,6 +193,10 @@ ifdef CONFIG_HE_OVERRIDES
|
|
CFLAGS += -DCONFIG_HE_OVERRIDES
|
|
endif
|
|
|
|
+ifdef CONFIG_EHT_OVERRIDES
|
|
+CFLAGS += -DCONFIG_EHT_OVERRIDES
|
|
+endif
|
|
+
|
|
ifndef CONFIG_BACKEND
|
|
CONFIG_BACKEND=file
|
|
endif
|
|
@@ -942,6 +946,9 @@ endif
|
|
ifdef CONFIG_IEEE80211AX
|
|
OBJS += ../src/ap/ieee802_11_he.o
|
|
endif
|
|
+ifdef CONFIG_IEEE80211BE
|
|
+OBJS += ../src/ap/ieee802_11_eht.o
|
|
+endif
|
|
ifdef CONFIG_WNM_AP
|
|
CFLAGS += -DCONFIG_WNM_AP
|
|
OBJS += ../src/ap/wnm_ap.o
|
|
@@ -971,6 +978,10 @@ ifdef CONFIG_IEEE80211AX
|
|
CFLAGS += -DCONFIG_IEEE80211AX
|
|
endif
|
|
|
|
+ifdef CONFIG_IEEE80211BE
|
|
+CFLAGS += -DCONFIG_IEEE80211BE
|
|
+endif
|
|
+
|
|
ifdef NEED_AP_MLME
|
|
OBJS += ../src/ap/wmm.o
|
|
OBJS += ../src/ap/ap_list.o
|
|
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
|
|
index 5c65d2dd68cc..a9d995af7719 100644
|
|
--- a/wpa_supplicant/ap.c
|
|
+++ b/wpa_supplicant/ap.c
|
|
@@ -395,6 +395,11 @@ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s,
|
|
HT_CAP_INFO_TX_STBC |
|
|
HT_CAP_INFO_MAX_AMSDU_SIZE);
|
|
|
|
+ if (mode->eht_capab[wpas_mode_to_ieee80211_mode(
|
|
+ ssid->mode)].eht_supported &&
|
|
+ ssid->eht)
|
|
+ conf->ieee80211be = 1;
|
|
+
|
|
/* check this before VHT, because setting oper chan
|
|
* width and friends is the same call for HE and VHT
|
|
* and checks if conf->ieee8021ax == 1 */
|
|
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
|
|
index 8274ec9e53d4..c2e24125ae5a 100644
|
|
--- a/wpa_supplicant/config.c
|
|
+++ b/wpa_supplicant/config.c
|
|
@@ -2764,6 +2764,9 @@ static const struct parse_data ssid_fields[] = {
|
|
#ifdef CONFIG_HE_OVERRIDES
|
|
{ INT_RANGE(disable_he, 0, 1)},
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ { INT_RANGE(disable_eht, 0, 1)},
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
{ INT(ap_max_inactivity) },
|
|
{ INT(dtim_period) },
|
|
{ INT(beacon_int) },
|
|
@@ -3273,6 +3276,7 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid)
|
|
ssid->ht = 1;
|
|
ssid->vht = 1;
|
|
ssid->he = 1;
|
|
+ ssid->eht = 1;
|
|
#ifdef IEEE8021X_EAPOL
|
|
ssid->eapol_flags = DEFAULT_EAPOL_FLAGS;
|
|
ssid->eap_workaround = DEFAULT_EAP_WORKAROUND;
|
|
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
|
|
index d5187c95aabb..58346e02ffc3 100644
|
|
--- a/wpa_supplicant/config_file.c
|
|
+++ b/wpa_supplicant/config_file.c
|
|
@@ -887,6 +887,9 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
|
|
#ifdef CONFIG_HE_OVERRIDES
|
|
INT(disable_he);
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ INT(disable_eht);
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
INT(disable_40mhz_scan);
|
|
INT(beacon_tx_mode);
|
|
INT(enable_160mhz_bw);
|
|
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
|
|
index 395b7e517fd0..4ac5324aea8e 100644
|
|
--- a/wpa_supplicant/config_ssid.h
|
|
+++ b/wpa_supplicant/config_ssid.h
|
|
@@ -567,6 +567,8 @@ struct wpa_ssid {
|
|
|
|
int he;
|
|
|
|
+ int eht;
|
|
+
|
|
int max_oper_chwidth;
|
|
|
|
unsigned int vht_center_freq1;
|
|
@@ -814,6 +816,16 @@ struct wpa_ssid {
|
|
int disable_he;
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ /**
|
|
+ * disable_eht - Disable EHT (IEEE 802.11be) for this network
|
|
+ *
|
|
+ * By default, use it if it is available, but this can be configured
|
|
+ * to 1 to have it disabled.
|
|
+ */
|
|
+ int disable_eht;
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
+
|
|
/**
|
|
* ap_max_inactivity - Timeout in seconds to detect STA's inactivity
|
|
*
|
|
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
|
|
index b53a538bec54..45befc9f1dc0 100644
|
|
--- a/wpa_supplicant/ctrl_iface.c
|
|
+++ b/wpa_supplicant/ctrl_iface.c
|
|
@@ -2306,11 +2306,12 @@ static int wpa_supplicant_ctrl_iface_status(struct wpa_supplicant *wpa_s,
|
|
|
|
if (wpa_s->connection_set &&
|
|
(wpa_s->connection_ht || wpa_s->connection_vht ||
|
|
- wpa_s->connection_he)) {
|
|
+ wpa_s->connection_he || wpa_s->connection_eht)) {
|
|
ret = os_snprintf(pos, end - pos,
|
|
"wifi_generation=%u\n",
|
|
- wpa_s->connection_he ? 6 :
|
|
- (wpa_s->connection_vht ? 5 : 4));
|
|
+ wpa_s->connection_eht ? 7 :
|
|
+ (wpa_s->connection_he ? 6 :
|
|
+ (wpa_s->connection_vht ? 5 : 4)));
|
|
if (os_snprintf_error(end - pos, ret))
|
|
return pos - buf;
|
|
pos += ret;
|
|
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
|
|
index 13929de49c97..d53e54e65408 100644
|
|
--- a/wpa_supplicant/events.c
|
|
+++ b/wpa_supplicant/events.c
|
|
@@ -2952,6 +2952,8 @@ static int wpa_supplicant_event_associnfo(struct wpa_supplicant *wpa_s,
|
|
BAND_2_4_GHZ);
|
|
wpa_s->connection_he = req_elems.he_capabilities &&
|
|
resp_elems.he_capabilities;
|
|
+ wpa_s->connection_eht = req_elems.eht_capabilities &&
|
|
+ resp_elems.eht_capabilities;
|
|
}
|
|
}
|
|
|
|
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
|
|
index 1dc7001a7305..9f37e64fe85c 100644
|
|
--- a/wpa_supplicant/sme.c
|
|
+++ b/wpa_supplicant/sme.c
|
|
@@ -1980,6 +1980,9 @@ mscs_fail:
|
|
#ifdef CONFIG_HE_OVERRIDES
|
|
wpa_supplicant_apply_he_overrides(wpa_s, ssid, ¶ms);
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ wpa_supplicant_apply_eht_overrides(wpa_s, ssid, ¶ms);
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
#ifdef CONFIG_IEEE80211R
|
|
if (auth_type == WLAN_AUTH_FT && wpa_s->sme.ft_ies &&
|
|
get_ie(wpa_s->sme.ft_ies, wpa_s->sme.ft_ies_len,
|
|
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
|
|
index 23e09a66e259..8e5a8ff2d1e5 100644
|
|
--- a/wpa_supplicant/wpa_cli.c
|
|
+++ b/wpa_supplicant/wpa_cli.c
|
|
@@ -1471,6 +1471,9 @@ static const char *network_fields[] = {
|
|
#ifdef CONFIG_HE_OVERRIDES
|
|
"disable_he",
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ "disable_eht",
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
"ap_max_inactivity", "dtim_period", "beacon_int",
|
|
#ifdef CONFIG_MACSEC
|
|
"macsec_policy",
|
|
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
|
|
index 07cd01c65776..593e5b851616 100644
|
|
--- a/wpa_supplicant/wpa_supplicant.c
|
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
|
@@ -2584,10 +2584,18 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
|
|
|
|
/* Allow HE on 2.4 GHz without VHT: see nl80211_put_freq_params() */
|
|
if (is_24ghz) {
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ if (is_24ghz && ssid->disable_eht)
|
|
+ freq->eht_enabled = 0;
|
|
+ else
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
+ freq->eht_enabled = mode->eht_capab[ieee80211_mode].eht_supported;
|
|
+
|
|
#ifdef CONFIG_HE_OVERRIDES
|
|
- if (ssid->disable_he)
|
|
+ if (ssid->disable_he) {
|
|
freq->he_enabled = 0;
|
|
- else
|
|
+ freq->eht_enabled = 0;
|
|
+ } else
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
freq->he_enabled = mode->he_capab[ieee80211_mode].he_supported;
|
|
|
|
@@ -2691,6 +2699,13 @@ skip_vht80:
|
|
vht_freq.he_enabled = 0;
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+skip_vht80:
|
|
+ if (ssid->disable_eht)
|
|
+ vht_freq.eht_enabled = 0;
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
+
|
|
+
|
|
#ifdef CONFIG_HT_OVERRIDES
|
|
skip_ht40:
|
|
#endif /* CONFIG_HT_OVERRIDES */
|
|
@@ -2845,6 +2860,12 @@ skip_to_6ghz:
|
|
freq->he_enabled = 0;
|
|
}
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ if (ssid->disable_eht) {
|
|
+ vht_freq.eht_enabled = 0;
|
|
+ freq->eht_enabled = 0;
|
|
+ }
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,
|
|
freq->channel, ssid->enable_edmg,
|
|
ssid->edmg_channel, freq->ht_enabled,
|
|
@@ -4061,6 +4082,9 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
|
|
#ifdef CONFIG_HE_OVERRIDES
|
|
wpa_supplicant_apply_he_overrides(wpa_s, ssid, ¶ms);
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+ wpa_supplicant_apply_eht_overrides(wpa_s, ssid, ¶ms);
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
|
|
#ifdef CONFIG_P2P
|
|
/*
|
|
@@ -5857,6 +5881,17 @@ void wpa_supplicant_apply_he_overrides(
|
|
}
|
|
#endif /* CONFIG_HE_OVERRIDES */
|
|
|
|
+#ifdef CONFIG_EHT_OVERRIDES
|
|
+void wpa_supplicant_apply_eht_overrides(
|
|
+ struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
|
+ struct wpa_driver_associate_params *params)
|
|
+{
|
|
+ if (!ssid)
|
|
+ return;
|
|
+
|
|
+ params->disable_eht = ssid->disable_eht;
|
|
+}
|
|
+#endif /* CONFIG_EHT_OVERRIDES */
|
|
|
|
static int pcsc_reader_init(struct wpa_supplicant *wpa_s)
|
|
{
|
|
diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
|
|
index 5fa765fda25c..fd75d1bfe813 100644
|
|
--- a/wpa_supplicant/wpa_supplicant_i.h
|
|
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
|
@@ -958,6 +958,7 @@ struct wpa_supplicant {
|
|
unsigned int connection_ht:1;
|
|
unsigned int connection_vht:1;
|
|
unsigned int connection_he:1;
|
|
+ unsigned int connection_eht:1;
|
|
unsigned int disable_mbo_oce:1;
|
|
|
|
struct os_reltime last_mac_addr_change;
|
|
@@ -1532,6 +1533,9 @@ void wpa_supplicant_apply_vht_overrides(
|
|
void wpa_supplicant_apply_he_overrides(
|
|
struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
|
struct wpa_driver_associate_params *params);
|
|
+void wpa_supplicant_apply_eht_overrides(
|
|
+ struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
|
+ struct wpa_driver_associate_params *params);
|
|
|
|
int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
|
|
int wpa_supplicant_set_wpa_none_key(struct wpa_supplicant *wpa_s,
|
|
--
|
|
2.7.4
|
|
|