tests: AP MLD with two links when only one of the links is negotiated

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2024-04-22 13:31:06 +03:00 committed by Jouni Malinen
parent df59880042
commit 42080798b5

View file

@ -374,7 +374,8 @@ def test_eht_mld_owe_two_links(dev, apdev):
"""EHT MLD AP with MLD client OWE connection using two links"""
_eht_mld_owe_two_links(dev, apdev)
def _eht_mld_owe_two_links(dev, apdev, second_link_disabled=False):
def _eht_mld_owe_two_links(dev, apdev, second_link_disabled=False,
only_one_link=False):
with HWSimRadio(use_mlo=True) as (hapd0_radio, hapd0_iface), \
HWSimRadio(use_mlo=True) as (hapd1_radio, hapd1_iface), \
HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface):
@ -394,28 +395,43 @@ def _eht_mld_owe_two_links(dev, apdev, second_link_disabled=False):
hapd1 = eht_mld_enable_ap(hapd0_iface, params)
# Check legacy client connection
dev[0].connect(ssid, scan_freq="2437", key_mgmt="OWE", ieee80211w="2")
if only_one_link:
link0 = hapd0.get_status_field("link_addr")
wpas.set("bssid_filter", link0)
wpas.connect(ssid, scan_freq="2412 2437", key_mgmt="OWE",
ieee80211w="2")
active_links = 3
valid_links = 3
if second_link_disabled:
dlinks = _eht_dormant_links(wpas)
if dlinks != 2:
raise Exception("Unexpected dormant links")
active_links = 1
if only_one_link:
active_links = 1
valid_links = 1
eht_verify_status(wpas, hapd0, 2412, 20, is_ht=True, mld=True,
valid_links=3, active_links=active_links)
valid_links=valid_links, active_links=active_links)
eht_verify_wifi_version(wpas)
traffic_test(wpas, hapd0)
if not second_link_disabled:
traffic_test(wpas, hapd1)
if only_one_link:
wpas.set("bssid_filter", "")
def test_eht_mld_owe_two_links_one_disabled(dev, apdev):
"""AP MLD with MLD client OWE connection when one of the AP MLD links is disabled"""
_eht_mld_owe_two_links(dev, apdev, second_link_disabled=True)
def test_eht_mld_owe_two_links_only_one_negotiated(dev, apdev):
"""AP MLD with MLD client OWE connection when only one of the links is negotiated"""
_eht_mld_owe_two_links(dev, apdev, only_one_link=True)
def test_eht_mld_sae_single_link(dev, apdev):
"""EHT MLD AP with MLD client SAE H2E connection using single link"""
with HWSimRadio(use_mlo=True) as (hapd_radio, hapd_iface), \