[PATCH] supplicant: allow disabling MLO.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Greear <greearb@xxxxxxxxxxxxxxx>

MLO should be disabled in case EHT is disabled, and also add new
configurable to disable MLO regardless of EHT settings.

Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
---
 wpa_supplicant/config.c            | 1 +
 wpa_supplicant/config_file.c       | 1 +
 wpa_supplicant/config_ssid.h       | 8 ++++++++
 wpa_supplicant/sme.c               | 3 +++
 wpa_supplicant/wpa_cli.c           | 1 +
 wpa_supplicant/wpa_supplicant.conf | 4 ++++
 6 files changed, 18 insertions(+)

diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 5ccb14289..66f8d982a 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2720,6 +2720,7 @@ static const struct parse_data ssid_fields[] = {
 	{ INT_RANGE(transition_disable, 0, 255) },
 	{ INT_RANGE(sae_pk, 0, 2) },
 	{ INT_RANGE(disable_eht, 0, 1)},
+	{ INT_RANGE(disable_mlo, 0, 1)},
 	{ INT_RANGE(enable_4addr_mode, 0, 1)},
 };
 
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index b8805d386..52a427e7c 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -898,6 +898,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
 	INT(disable_ofdma);
 #endif /* CONFIG_HE_OVERRIDES */
 	INT(disable_eht);
+	INT(disable_mlo);
 	INT(enable_4addr_mode);
 
 #undef STR
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index ee6fdf146..ab4b00682 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -1300,6 +1300,14 @@ struct wpa_ssid {
 	 */
 	int disable_eht;
 
+	/**
+	 * disable_mlo - Disable MLO for this network
+	 *
+	 * By default, use it if it is available, but this can be configured
+	 * to 1 to have it disabled.
+	 */
+	int disable_mlo;
+
 	/**
 	 * enable_4addr_mode - Set 4addr mode after association
 	 * 0 = Do not attempt to set 4addr mode
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index bf76c0a95..acb6981d9 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -404,6 +404,9 @@ static bool wpas_ml_element(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
 	if (!(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO))
 		return false;
 
+	if (ssid->disable_eht || ssid->disable_mlo)
+		return false;
+
 	mlbuf = wpa_bss_defrag_mle(bss, MULTI_LINK_CONTROL_TYPE_BASIC);
 	if (!mlbuf) {
 		wpa_dbg(wpa_s, MSG_DEBUG, "MLD: No ML element");
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 2a8c20f1f..d1a33b89d 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1501,6 +1501,7 @@ static const char *network_fields[] = {
 	"disable_ofdma",
 #endif /* CONFIG_HE_OVERRIDES */
 	"disable_eht",
+	"disable_mlo",
 	"ap_max_inactivity", "dtim_period", "beacon_int",
 #ifdef CONFIG_MACSEC
 	"macsec_policy",
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index ed07e9ab3..78be73a74 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -1800,6 +1800,10 @@ fast_reauth=1
 # 0 = EHT enabled (if supported) (default)
 # 1 = EHT disabled
 
+# disable_mlo: Whether MLO should be disabled.
+# 0 = MLO enabled (if supported) (default)
+# 1 = MLO disabled
+
 # multi_ap_backhaul_sta: Multi-AP backhaul STA functionality
 # 0 = normal STA (default)
 # 1 = backhaul STA
-- 
2.40.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux