]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Add test with stuck ECSA in Probe Response frames
authorJohannes Berg <johannes.berg@intel.com>
Thu, 28 Mar 2024 13:07:00 +0000 (14:07 +0100)
committerJouni Malinen <j@w1.fi>
Tue, 16 Apr 2024 07:46:15 +0000 (10:46 +0300)
Add a test behaving like an Asus RT-AC53 with firmware
3.0.0.4.380_10760-g21a5898, which (in some cases?) can have an ECSA
element stuck in the probe response, when the channel switch is long
finished.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/test_ap_csa.py

index bcfad4ca1de03de41860586a506ad89382423a48..ae1162c993099e22ad4d850a2bf3032b69b3820d 100644 (file)
@@ -257,3 +257,20 @@ def test_assoc_while_csa_diff_blocktx(dev, apdev):
 def test_assoc_while_csa_diff(dev, apdev):
     """Check we don't associate while AP is doing CSA (different channel)"""
     _assoc_while_csa(dev, apdev, 5200, False)
+
+def test_ap_stuck_ecsa(dev, apdev):
+    """ECSA element stuck in Probe Response frame"""
+
+    # Test behaving like an Asus RT-AC53, firmware 3.0.0.4.380_10760-g21a5898,
+    # which has stuck ECSA element in the Probe Response frames.
+    try:
+        ap = connect(dev[0], apdev, scan_freq=None,
+                     hw_mode='a', channel='36',
+                     country_code='FI',
+                     presp_elements="3c0401732409")
+        ap.wait_sta()
+        hwsim_utils.test_connectivity(dev[0], ap)
+    finally:
+        dev[0].request("DISCONNECT")
+        dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=1)
+        clear_regdom(ap, dev)