summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJouni Malinen <quic_jouni@quicinc.com>2023-04-26 21:39:12 +0300
committerJouni Malinen <j@w1.fi>2023-04-26 23:10:03 +0300
commit230ca559cbc50a3a76b15a514ac0810422ed86c7 (patch)
tree2e33277f46cfbda6cff87e624073eb99c0a0deee
parentc4034a69fea1cf4a43b930034c37fcc2a04d951f (diff)
downloadhostap-230ca559cbc50a3a76b15a514ac0810422ed86c7.tar.gz
tests: Additional 6 GHz band ACS coverage
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
-rw-r--r--tests/hwsim/test_he.py27
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/hwsim/test_he.py b/tests/hwsim/test_he.py
index a4e57ec8f..6c5ce395f 100644
--- a/tests/hwsim/test_he.py
+++ b/tests/hwsim/test_he.py
@@ -1275,8 +1275,7 @@ def test_he_6ghz_auto_security(dev, apdev):
if "[MFP]" in sta["flags"]:
raise Exception("MFP reported unexpectedly(2)")
-def test_he_6ghz_acs(dev, apdev):
- """HE with ACS on 6 GHz using a 40 MHz channel"""
+def he_6ghz_acs(dev, apdev, op_class, bw):
check_sae_capab(dev[0])
try:
@@ -1284,7 +1283,7 @@ def test_he_6ghz_acs(dev, apdev):
hapd = None
params = {"ssid": "he",
"country_code": "DE",
- "op_class": "132",
+ "op_class": str(op_class),
"hw_mode": "a",
"channel": "0",
"ieee80211ax": "1",
@@ -1303,8 +1302,10 @@ def test_he_6ghz_acs(dev, apdev):
raise Exception("Unexpected frequency: " + freq)
sec = hapd.get_status_field("secondary_channel")
- if int(sec) == 0:
+ if bw > 20 and int(sec) == 0:
raise Exception("Secondary channel not set")
+ if bw == 20 and int(sec) != 0:
+ raise Exception("Secondary channel set")
dev[0].set("sae_groups", "")
dev[0].connect("he", sae_password="password", key_mgmt="SAE",
@@ -1313,7 +1314,7 @@ def test_he_6ghz_acs(dev, apdev):
sig = dev[0].request("SIGNAL_POLL").splitlines()
if "FREQUENCY=" + freq not in sig:
raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig))
- if "WIDTH=40 MHz" not in sig:
+ if "WIDTH=" + str(bw) + " MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))
except Exception as e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
@@ -1325,6 +1326,22 @@ def test_he_6ghz_acs(dev, apdev):
dev[0].set("sae_pwe", "0")
clear_regdom(hapd, dev)
+def test_he_6ghz_acs_20mhz(dev, apdev):
+ """HE with ACS on 6 GHz using a 20 MHz channel"""
+ he_6ghz_acs(dev, apdev, 131, 20)
+
+def test_he_6ghz_acs_40mhz(dev, apdev):
+ """HE with ACS on 6 GHz using a 40 MHz channel"""
+ he_6ghz_acs(dev, apdev, 132, 40)
+
+def test_he_6ghz_acs_80mhz(dev, apdev):
+ """HE with ACS on 6 GHz using an 80 MHz channel"""
+ he_6ghz_acs(dev, apdev, 133, 80)
+
+def test_he_6ghz_acs_160mhz(dev, apdev):
+ """HE with ACS on 6 GHz using a 160 MHz channel"""
+ he_6ghz_acs(dev, apdev, 134, 160)
+
def test_he_6ghz_security(dev, apdev):
"""HE AP and 6 GHz security parameter validation"""
params = {"ssid": "he",