developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 1 | From 29a075f5ea644abdfb9bd93f79b05c72bb9fb78c Mon Sep 17 00:00:00 2001 |
| 2 | From: Aditya Kumar Singh <quic_adisi@quicinc.com> |
| 3 | Date: Thu, 28 Mar 2024 23:46:52 +0530 |
| 4 | Subject: [PATCH 022/104] tests: MLO: add cohosted MLDs connectivity testing |
| 5 | |
| 6 | Add test case 'eht_mld_cohosted_connectivity' which creates two 2 link AP |
| 7 | MLDs and connect 2 links MLD client to each one of them and test data |
| 8 | traffic. |
| 9 | |
| 10 | Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> |
| 11 | --- |
| 12 | tests/hwsim/test_eht.py | 42 +++++++++++++++++++++++++++++++++++++++++ |
| 13 | 1 file changed, 42 insertions(+) |
| 14 | |
| 15 | diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py |
| 16 | index 732406219..f09d31878 100644 |
| 17 | --- a/tests/hwsim/test_eht.py |
| 18 | +++ b/tests/hwsim/test_eht.py |
| 19 | @@ -2053,3 +2053,45 @@ def test_eht_mld_cohosted_discovery(dev, apdev, params): |
| 20 | def test_eht_mld_cohosted_discovery_with_rnr(dev, apdev, params): |
| 21 | """EHT 2 AP MLDs discovery (with co-location RNR)""" |
| 22 | eht_mld_cohosted_discovery(dev, apdev, params, rnr=True) |
| 23 | + |
| 24 | +def test_eht_mld_cohosted_connectivity(dev, apdev, params): |
| 25 | + """EHT 2 AP MLDs with 2 MLD clients connection""" |
| 26 | + with HWSimRadio(use_mlo=True, n_channels=2) as (hapd_radio, hapd_iface), \ |
| 27 | + HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface), \ |
| 28 | + HWSimRadio(use_mlo=True) as (wpas_radio1, wpas_iface1): |
| 29 | + |
| 30 | + wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') |
| 31 | + wpas.interface_add(wpas_iface) |
| 32 | + |
| 33 | + wpas1 = WpaSupplicant(global_iface='/tmp/wpas-wlan5') |
| 34 | + wpas1.interface_add(wpas_iface1) |
| 35 | + |
| 36 | + hapds = get_mld_devs(hapd_iface=hapd_iface, count=2, prefix=params['prefix'], |
| 37 | + rnr=False) |
| 38 | + |
| 39 | + passphrase = "qwertyuiop-" |
| 40 | + ssid = "mld-" |
| 41 | + |
| 42 | + # Connect one client to first AP MLD and verify traffic on both links |
| 43 | + wpas.set("sae_pwe", "1") |
| 44 | + wpas.connect(ssid+"0", sae_password=passphrase+"0", scan_freq="2412", |
| 45 | + key_mgmt="SAE", ieee80211w="2") |
| 46 | + |
| 47 | + eht_verify_status(wpas, hapds[0], 2412, 20, is_ht=True, mld=True, |
| 48 | + valid_links=3, active_links=3) |
| 49 | + eht_verify_wifi_version(wpas) |
| 50 | + |
| 51 | + traffic_test(wpas, hapds[0]) |
| 52 | + traffic_test(wpas, hapds[1]) |
| 53 | + |
| 54 | + # Connect another client to second AP MLD and verify traffic on both links |
| 55 | + wpas1.set("sae_pwe", "1") |
| 56 | + wpas1.connect(ssid+"1", sae_password=passphrase+"1", scan_freq="2437", |
| 57 | + key_mgmt="SAE", ieee80211w="2") |
| 58 | + |
| 59 | + eht_verify_status(wpas1, hapds[3], 2437, 20, is_ht=True, mld=True, |
| 60 | + valid_links=3, active_links=3) |
| 61 | + eht_verify_wifi_version(wpas1) |
| 62 | + |
| 63 | + traffic_test(wpas1, hapds[3]) |
| 64 | + traffic_test(wpas1, hapds[2]) |
| 65 | -- |
| 66 | 2.39.2 |
| 67 | |