[PATCH 7/8] tests: Verify BTM request with link removal imminent flow

Andrei Otcheretianski andrei.otcheretianski at intel.com
Wed Dec 13 06:04:11 PST 2023


From: Ilan Peer <ilan.peer at intel.com>

Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
 tests/hwsim/test_eht.py | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py
index dbffe172f5..c1a6b17121 100644
--- a/tests/hwsim/test_eht.py
+++ b/tests/hwsim/test_eht.py
@@ -882,3 +882,40 @@ def test_eht_mld_link_removal(dev, apdev):
 
         logger.info("Test traffic after 1st link disabled")
         traffic_test(wpas, hapd0, success=False)
+
+def test_eht_mld_bss_trans_mgmt_link_removal_imminent(dev, apdev):
+    """EHT MLD with two links. BSS transition management with link removal imminent"""
+
+    with HWSimRadio(use_mlo=True) as (hapd0_radio, hapd0_iface), \
+        HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface):
+
+        wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+        wpas.interface_add(wpas_iface)
+
+        ssid = "mld_ap_owe_two_link"
+        params = eht_mld_ap_wpa2_params(ssid, key_mgmt="OWE", mfp="2")
+        params["bss_transition"] = "1"
+        params["mbo"] = "1"
+
+        hapd0 = eht_mld_enable_ap(hapd0_iface, params)
+
+        params['channel'] = '6'
+
+        hapd1 = eht_mld_enable_ap(hapd0_iface, params)
+
+        wpas.connect(ssid, scan_freq="2412 2437", key_mgmt="OWE", ieee80211w="2")
+        eht_verify_status(wpas, hapd0, 2412, 20, is_ht=True, mld=True, valid_links=3,
+                           active_links=3)
+        eht_verify_wifi_version(wpas)
+        traffic_test(wpas, hapd0)
+
+        addr = wpas.own_addr()
+        cmd = "BSS_TM_REQ " + addr + " disassoc_timer=3 disassoc_imminent=1 link_removal_imminent=1"
+
+        if "OK" not in hapd0.request(cmd):
+            raise Exception("BSS_TM_REQ command failed")
+
+        # The station is expected to ignore the BSS TM request as it is associated with multiple links
+        ev = hapd0.wait_event(['BSS-TM-RESP'], timeout=2)
+        if ev:
+            raise Exception("Unexpected BSS TM response: " + ev )
-- 
2.38.1




More information about the Hostap mailing list