diff mbox series

supplicant: allow disabling MLO.

Message ID 20231005233600.3364435-1-greearb@candelatech.com
State Changes Requested
Headers show
Series supplicant: allow disabling MLO. | expand

Commit Message

Ben Greear Oct. 5, 2023, 11:36 p.m. UTC
From: Ben Greear <greearb@candelatech.com>

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@candelatech.com>
---
 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(+)

Comments

Jouni Malinen Oct. 28, 2023, 8:55 a.m. UTC | #1
On Thu, Oct 05, 2023 at 04:36:00PM -0700, greearb@candelatech.com wrote:
> MLO should be disabled in case EHT is disabled, and also add new
> configurable to disable MLO regardless of EHT settings.

Agreed with the first part and that was what was already supposed to
happen with disable_eht=1, but if that is not the case with all drivers,
that should indeed be fixed.

As far as the second part is concerned, what is the use case for
disabling MLO without EHT? There is an expectation for EHT to mandate
use of MLO in practice.
Ben Greear Oct. 28, 2023, 3:31 p.m. UTC | #2
On 10/28/23 1:55 AM, Jouni Malinen wrote:
> On Thu, Oct 05, 2023 at 04:36:00PM -0700, greearb@candelatech.com wrote:
>> MLO should be disabled in case EHT is disabled, and also add new
>> configurable to disable MLO regardless of EHT settings.
> 
> Agreed with the first part and that was what was already supposed to
> happen with disable_eht=1, but if that is not the case with all drivers,
> that should indeed be fixed.
> 
> As far as the second part is concerned, what is the use case for
> disabling MLO without EHT? There is an expectation for EHT to mandate
> use of MLO in practice.

For one thing, a currently available wifi-7 hardware/firmware crashes often
when you enable MLO with 2+ links (see my patch to fix MLD IE parsing).

And even in cases where it used a single MLO link and didn't crash, performance
was much worse than when MLO was disabled.

The MLO/MLD logic is too fragile at the moment, so it is good to be able to
disable it in case you just need a functional wifi on a wifi-7 radio.

Thanks,
Ben
Janusz Dziedzic June 24, 2024, 10 a.m. UTC | #3
sob., 28 paź 2023 o 17:37 Ben Greear <greearb@candelatech.com> napisał(a):
>
> On 10/28/23 1:55 AM, Jouni Malinen wrote:
> > On Thu, Oct 05, 2023 at 04:36:00PM -0700, greearb@candelatech.com wrote:
> >> MLO should be disabled in case EHT is disabled, and also add new
> >> configurable to disable MLO regardless of EHT settings.
> >
> > Agreed with the first part and that was what was already supposed to
> > happen with disable_eht=1, but if that is not the case with all drivers,
> > that should indeed be fixed.
> >
> > As far as the second part is concerned, what is the use case for
> > disabling MLO without EHT? There is an expectation for EHT to mandate
> > use of MLO in practice.
>
> For one thing, a currently available wifi-7 hardware/firmware crashes often
> when you enable MLO with 2+ links (see my patch to fix MLD IE parsing).
>
> And even in cases where it used a single MLO link and didn't crash, performance
> was much worse than when MLO was disabled.
>
> The MLO/MLD logic is too fragile at the moment, so it is good to be able to
> disable it in case you just need a functional wifi on a wifi-7 radio.
>

I see today Intel BE200 using EHT with disabled MLO by default.
It is require patch to get MLO enabled.
Problem is after enable MLO in the driver we can't use it with MLO
disable (default option) without driver recompiliation.
Nice to have this option to test MLD APs with regular (non-MLO) station.

Maybe add it under:
#ifdef CONFIG_TESTING_OPTIONS
like mld_force_single_link

Not sure this will be easy to do.
Could be useful for testing purpose.

BR
Janusz
diff mbox series

Patch

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