diff mbox series

[3/3] tests: add test with stuck ECSA in probe response

Message ID 20240328140657.718acf749bd7.Ia51d8220c59936191138d7aab0366c749ed37fdb@changeid
State Accepted
Headers show
Series [1/3] hostapd: add support for testing probe response elements | expand

Commit Message

Johannes Berg March 28, 2024, 1:07 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

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 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/tests/hwsim/test_ap_csa.py b/tests/hwsim/test_ap_csa.py
index f05eaf1d7ecd..a8a4ef61a040 100644
--- a/tests/hwsim/test_ap_csa.py
+++ b/tests/hwsim/test_ap_csa.py
@@ -256,3 +256,17 @@  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):
+    """Test behaving like an Asus RT-AC53, firmware 3.0.0.4.380_10760-g21a5898,
+    which has stuck ECSA element in the probe response."""
+    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")
+        clear_regdom(ap, dev)