]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Extend color change test for a non-first link of an AP MLD
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Wed, 12 Jun 2024 14:27:54 +0000 (19:57 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 11 Jul 2024 14:25:25 +0000 (17:25 +0300)
Currently color change test is supported only on the first link of the
AP MLD. Extend the support to test on non-first link as well.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
tests/hwsim/test_eht.py

index d8fbf581547690a0e8ef78ac33f233ef3425b563..cc679682cc7009392d1a56d728c42e3de53081d6 100644 (file)
@@ -2166,7 +2166,23 @@ def test_eht_mlo_color_change(dev, apdev):
         if color != "60":
             raise Exception("Expected current he_bss_color to be 60; was " + color)
 
-        #TODO: CCA on non-first link
+        logger.info("Perform CCA on 2nd link")
+        if "OK" not in hapd1.request("COLOR_CHANGE 25"):
+            raise Exception("COLOR_CHANGE failed")
+        time.sleep(1.5)
+
+        color = hapd1.get_status_field("he_bss_color")
+        if color != "25":
+            raise Exception("Expected current he_bss_color to be 25; was " + color)
+
+        logger.info("Perform CCA on 2nd link again")
+        if "OK" not in hapd1.request("COLOR_CHANGE 5"):
+            raise Exception("COLOR_CHANGE failed")
+        time.sleep(1.5)
+
+        color = hapd1.get_status_field("he_bss_color")
+        if color != "5":
+            raise Exception("Expected current he_bss_color to be 5; was " + color)
 
         hapd0.dump_monitor()
         hapd1.dump_monitor()