From b7c6aa3ac681f7b27ee45ad85ee54458c38abc4c Mon Sep 17 00:00:00 2001 From: Aditya Kumar Singh Date: Wed, 12 Jun 2024 19:57:54 +0530 Subject: [PATCH] tests: Extend color change test for a non-first link of an AP MLD 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 --- tests/hwsim/test_eht.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py index d8fbf5815..cc679682c 100644 --- a/tests/hwsim/test_eht.py +++ b/tests/hwsim/test_eht.py @@ -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()