]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: EHT+MLO AP with SAE and transition mode
authorJouni Malinen <quic_jouni@quicinc.com>
Wed, 25 Oct 2023 11:06:23 +0000 (14:06 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 25 Oct 2023 11:06:23 +0000 (14:06 +0300)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_eht.py
tests/hwsim/wpasupplicant.py

index ce9d8a078fa718aa6488d92457b43fc65c61e953..657feb06e89792e67650c0ec76147be764791035 100644 (file)
@@ -107,18 +107,18 @@ def test_prefer_eht_20(dev, apdev):
     if est != "172103":
       raise Exception("Unexpected BSS1 est_throughput: " + est)
 
-def start_eht_sae_ap(apdev, ml=False):
+def start_eht_sae_ap(apdev, ml=False, transition_mode=False):
     params = hostapd.wpa2_params(ssid="eht", passphrase="12345678")
     params["ieee80211ax"] = "1"
     params["ieee80211be"] = "1"
-    params['ieee80211w'] = '2'
-    params['rsn_pairwise'] = "GCMP-256"
-    params['group_cipher'] = "GCMP-256"
-    params["group_mgmt_cipher"] = "BIP-GMAC-256"
-    params['beacon_prot'] = '2'
-    params['wpa_key_mgmt'] = 'SAE-EXT-KEY'
-    params['sae_groups'] = "20"
-    params['sae_pwe'] = "1"
+    params['ieee80211w'] = '1' if transition_mode else '2'
+    params['rsn_pairwise'] = "CCMP GCMP-256" if transition_mode else "GCMP-256"
+    params['group_cipher'] = "CCMP" if transition_mode else "GCMP-256"
+    params["group_mgmt_cipher"] = "AES-128-CMAC" if transition_mode else "BIP-GMAC-256"
+    params['beacon_prot'] = '1'
+    params['wpa_key_mgmt'] = "SAE SAE-EXT-KEY" if transition_mode else 'SAE-EXT-KEY'
+    params['sae_groups'] = "19 20" if transition_mode else "20"
+    params['sae_pwe'] = "2" if transition_mode else "1"
     if ml:
         ml_elem = "ff0d6b" + "3001" + "0a" + "021122334455" + "01" + "00" + "00"
         params['vendor_elements'] = ml_elem
@@ -162,6 +162,30 @@ def test_eht_sae_mlo(dev, apdev):
         dev[0].set("sae_groups", "")
         dev[0].set("sae_pwe", "0")
 
+def test_eht_sae_mlo_tm(dev, apdev):
+    """EHT+MLO AP with SAE and transition mode"""
+    check_sae_capab(dev[0])
+    check_sae_capab(dev[1])
+
+    hapd = start_eht_sae_ap(apdev[0], ml=True, transition_mode=True)
+    try:
+        dev[0].set("sae_groups", "20")
+        dev[0].set("sae_pwe", "2")
+        dev[0].connect("eht", key_mgmt="SAE-EXT-KEY", psk="12345678",
+                       ieee80211w="2", beacon_prot="1",
+                       pairwise="GCMP-256", group="CCMP",
+                       group_mgmt="AES-128-CMAC", scan_freq="2412")
+        dev[1].set("sae_groups", "19")
+        dev[1].connect("eht", key_mgmt="SAE-EXT-KEY", psk="12345678",
+                       ieee80211w="2", beacon_prot="1",
+                       pairwise="CCMP", group="CCMP",
+                       group_mgmt="AES-128-CMAC", scan_freq="2412",
+                       disable_eht="1")
+    finally:
+        dev[0].set("sae_groups", "")
+        dev[0].set("sae_pwe", "0")
+        dev[1].set("sae_groups", "")
+
 def eht_mld_enable_ap(iface, params):
     hapd = hostapd.add_mld_link(iface, params)
     hapd.enable()
index bd53a1ec0991b085029d018b981231a4a1b0254d..e9f10e221a2a620c6ef30c226412a99b68477c1a 100644 (file)
@@ -1099,7 +1099,7 @@ class WpaSupplicant:
                       "wep_tx_keyidx", "scan_freq", "freq_list", "eap",
                       "eapol_flags", "fragment_size", "scan_ssid", "auth_alg",
                       "wpa_ptk_rekey", "disable_ht", "disable_vht", "bssid",
-                      "disable_he",
+                      "disable_he", "disable_eht",
                       "disable_max_amsdu", "ampdu_factor", "ampdu_density",
                       "disable_ht40", "disable_sgi", "disable_ldpc",
                       "ht40_intolerant", "update_identifier", "mac_addr",