[PATCH v2 2/2] tests: MLO: add cohosted MLDs connectivity testing

Aditya Kumar Singh quic_adisi at quicinc.com
Sun Apr 21 21:12:39 PDT 2024


Add test case 'eht_mld_cohosted_connectivity' which creates two 2 link AP
MLDs and  connect 2 links MLD client to each one of them and test data
traffic.

Signed-off-by: Aditya Kumar Singh <quic_adisi at quicinc.com>
---
 tests/hwsim/test_eht.py | 44 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py
index b53f843c7ba8..a58f73d759c5 100644
--- a/tests/hwsim/test_eht.py
+++ b/tests/hwsim/test_eht.py
@@ -2053,3 +2053,47 @@ def test_eht_mld_cohosted_discovery(dev, apdev, params):
 def test_eht_mld_cohosted_discovery_with_rnr(dev, apdev, params):
     """EHT 2 AP MLDs discovery (with co-location RNR)"""
     eht_mld_cohosted_discovery(dev, apdev, params, rnr=True)
+
+def test_eht_mld_cohosted_connectivity(dev, apdev, params):
+    """EHT 2 AP MLDs with 2 MLD clients connection"""
+    with HWSimRadio(use_mlo=True, n_channels=2) as (hapd_radio, hapd_iface), \
+        HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface), \
+        HWSimRadio(use_mlo=True) as (wpas_radio1, wpas_iface1):
+
+        wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+        wpas.interface_add(wpas_iface)
+
+        wpas1 = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+        wpas1.interface_add(wpas_iface1)
+
+        hapds = get_mld_devs(hapd_iface=hapd_iface, count=2, prefix=params['prefix'],
+                             rnr=False)
+
+        passphrase = "qwertyuiop-"
+        ssid = "mld-"
+
+        # Connect one client to first AP MLD and verify traffic on both links
+        wpas.set("sae_pwe", "1")
+        wpas.connect(ssid+"0", sae_password=passphrase+"0", scan_freq="2412",
+                     key_mgmt="SAE", ieee80211w="2")
+
+        eht_verify_status(wpas, hapds[0], 2412, 20, is_ht=True, mld=True,
+                          valid_links=3, active_links=3)
+        eht_verify_wifi_version(wpas)
+
+        traffic_test(wpas, hapds[0])
+        traffic_test(wpas, hapds[1])
+
+        # Connect another client to second AP MLD and verify traffic on both links
+        wpas1.set("sae_pwe", "1")
+        wpas1.connect(ssid+"1", sae_password=passphrase+"1", scan_freq="2437",
+                      key_mgmt="SAE", ieee80211w="2")
+
+        eht_verify_status(wpas1, hapds[3], 2437, 20, is_ht=True, mld=True,
+                          valid_links=3, active_links=3)
+        eht_verify_wifi_version(wpas1)
+
+        traffic_test(wpas1, hapds[3])
+        traffic_test(wpas1, hapds[2])
+
+        stop_mld_devs(hapds, params['prefix'])
-- 
2.34.1




More information about the Hostap mailing list