[PATCH] tests: Correctly set the HE center frequency for 320 MHz tests

Johannes Berg johannes at sipsolutions.net
Fri Mar 13 00:03:04 PDT 2026


From: Ilan Peer <ilan.peer at intel.com>

The 320 MHz tests set the HE center frequency to be the same as the
EHT center frequency, which is obviously wrong. Fix the tests to
use the correct HE center frequency.

Reviewed-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 tests/hwsim/test_eht.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tests/hwsim/test_eht.py b/tests/hwsim/test_eht.py
index 2dc0e3cab94c..c3f3e6613e2c 100644
--- a/tests/hwsim/test_eht.py
+++ b/tests/hwsim/test_eht.py
@@ -1599,7 +1599,16 @@ def _test_eht_6ghz(dev, apdev, channel, op_class, ccfs1):
         params["ieee80211be"] = "1"
         params["channel"] = str(channel)
         params["op_class"] = str(op_class)
-        params["he_oper_centr_freq_seg0_idx"] = str(ccfs1)
+
+        if op_class == 137:
+            if ccfs1 > channel:
+                he_ccfs1 = ccfs1 - 16
+            else:
+                he_ccfs1 = ccfs1 + 16
+            params["he_oper_centr_freq_seg0_idx"] = str(he_ccfs1)
+        else:
+            params["he_oper_centr_freq_seg0_idx"] = str(ccfs1)
+
         params["eht_oper_centr_freq_seg0_idx"] = str(ccfs1)
         params["country_code"] = "CA"
 
-- 
2.53.0




More information about the Hostap mailing list