@@ -689,6 +689,69 @@ def test_eht_mld_sae_two_links(dev, apdev):
"""EHT MLD AP with MLD client SAE H2E connection using two links"""
run_eht_mld_sae_two_links(dev, apdev)
+def test_eht_mld_sae_two_links_sta_reconnect_no_sta(dev, apdev):
+ """EHT AP MLD with MLD STA reconnecting while AP still has STA (no_sta handling)"""
+ with HWSimRadio(use_mlo=True) as (hapd_radio, hapd_iface), \
+ HWSimRadio(use_mlo=True) as (wpas_radio, wpas_iface):
+
+ wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
+ wpas.interface_add(wpas_iface)
+ check_sae_capab(wpas)
+
+ passphrase = 'qwertyuiop'
+ ssid = "mld_ap_sae_two_link_reconnect"
+
+ params = eht_mld_ap_wpa2_params(ssid, passphrase,
+ key_mgmt="SAE", mfp="2", pwe="1")
+
+ hapd0 = eht_mld_enable_ap(hapd_iface, 0, params)
+
+ params1 = dict(params)
+ params1['channel'] = '6'
+ hapd1 = eht_mld_enable_ap(hapd_iface, 1, params1)
+
+ try:
+ wpas.set("sae_pwe", "1")
+ wpas.set("sae_groups", "20 19")
+
+ # Initial MLO connection
+ wpas.connect(ssid, sae_password=passphrase,
+ scan_freq="2412 2437",
+ key_mgmt="SAE", ieee80211w="2", beacon_prot="1")
+
+ eht_verify_status(wpas, hapd0, 2412, 20, is_ht=True, mld=True,
+ valid_links=3, active_links=3)
+ eht_verify_wifi_version(wpas)
+ if wpas.get_status_field('sae_group') != '19':
+ raise Exception("Initial SAE group not as expected")
+
+ sta = hapd0.get_sta(wpas.own_addr())
+ logger.info("MLD STA after first assoc at hapd0: " + str(sta))
+ if sta['addr'] == 'FAIL':
+ raise Exception("AP MLD did not create STA entry after first association")
+
+ traffic_test(wpas, hapd0)
+ traffic_test(wpas, hapd1)
+
+ # Reconnect (reassociate) without explicit disconnect from the test
+ time.sleep(1)
+ wpas.request("REASSOCIATE")
+ ev = wpas.wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)
+ if ev is None:
+ raise Exception("Reassociation did not complete")
+
+ # AP should still have a STA entry for this MLD STA
+ sta2 = hapd0.get_sta(wpas.own_addr())
+ logger.info("MLD STA after reassoc at hapd0: " + str(sta2))
+ if sta2['addr'] == 'FAIL':
+ raise Exception("AP MLD lost STA entry on reassociation")
+
+ traffic_test(wpas, hapd0)
+ traffic_test(wpas, hapd1)
+ finally:
+ wpas.set("sae_pwe", "0")
+ wpas.set("sae_groups", "")
+
def test_eht_mld_sae_two_links_no_beacon_prot(dev, apdev):
"""EHT MLD AP with MLD client SAE H2E connection using two links and no beacon protection"""
run_eht_mld_sae_two_links(dev, apdev, beacon_prot="0")
Add new hwsim test case(test_eht_mld_sae_two_links_sta_reconnect_no_sta) to validate the no_sta handling in the authentication and association frame. The test configures a 3‑link AP MLD and an MLD‑capable STA, performs an initial SAE-based MLO connection, and verifies expected MLD state and link activity. It then triggers a reassociation without an explicit disconnect to simulate a reconnect scenario where the AP may still hold a station entry while receiving frames marked with no_sta. A dedicated reconnect test verifies that an AP MLD preserves the STA entry across reassociation while receiving no_sta-marked frames, and that responses are sent to the correct destination after capability updates. Traffic is validated across all links after reconnect. These tests help to ensure correct infra-level behavior for frames marked with NL80211_ATTR_FRAME_CMD_NO_STA, preventing regressions in authentication, association, SA Query, and TX status processing for multi-link setups. Signed-off-by: Ramasamy Kaliappan <ramasamy.kaliappan@oss.qualcomm.com> --- tests/hwsim/test_eht.py | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)