]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: wpa_supplicant AP with all possible 20 MHz PRI for 80 MHz channel
authorJouni Malinen <quic_jouni@quicinc.com>
Fri, 27 Oct 2023 10:49:48 +0000 (13:49 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 27 Oct 2023 10:49:48 +0000 (13:49 +0300)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_wpas_ap.py

index 620cf614e9ac06960f946a8e4e8f9cf6c4b68c35..b2e605920f07ae2dc7fd45ecb93ee41f9bd897a6 100644 (file)
@@ -743,29 +743,44 @@ def test_wpas_ap_open_vht80(dev):
         dev[1].flush_scan_cache()
 
 def test_wpas_ap_open_vht80_us(dev):
-    """wpa_supplicant AP mode - VHT 80 MHz (US)"""
+    """wpa_supplicant AP mode - VHT 80 MHz (US) channel 149"""
+    run_wpas_ap_open_vht80_us(dev, 5745, 5775, 1)
+
+def test_wpas_ap_open_vht80_us_153(dev):
+    """wpa_supplicant AP mode - VHT 80 MHz (US) channel 153"""
+    run_wpas_ap_open_vht80_us(dev, 5765, 5775, -1)
+
+def test_wpas_ap_open_vht80_us_157(dev):
+    """wpa_supplicant AP mode - VHT 80 MHz (US) channel 157"""
+    run_wpas_ap_open_vht80_us(dev, 5785, 5775, 1)
+
+def test_wpas_ap_open_vht80_us_161(dev):
+    """wpa_supplicant AP mode - VHT 80 MHz (US) channel 161"""
+    run_wpas_ap_open_vht80_us(dev, 5805, 5775, -1)
+
+def run_wpas_ap_open_vht80_us(dev, freq, center_freq, ht40):
     id = dev[0].add_network()
     dev[0].set("country", "US")
     try:
         dev[0].set_network(id, "mode", "2")
         dev[0].set_network_quoted(id, "ssid", "wpas-ap-open")
         dev[0].set_network(id, "key_mgmt", "NONE")
-        dev[0].set_network(id, "frequency", "5745")
-        dev[0].set_network(id, "scan_freq", "5745")
+        dev[0].set_network(id, "frequency", str(freq))
+        dev[0].set_network(id, "scan_freq", str(freq))
         dev[0].set_network(id, "vht", "1")
-        dev[0].set_network(id, "vht_center_freq1", "5775")
+        dev[0].set_network(id, "vht_center_freq1", str(center_freq))
         dev[0].set_network(id, "max_oper_chwidth", "1")
-        dev[0].set_network(id, "ht40", "1")
+        dev[0].set_network(id, "ht40", str(ht40))
         dev[0].select_network(id)
         wait_ap_ready(dev[0])
 
-        dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq="5745")
+        dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq=str(freq))
         log_channel_info(dev[1])
         sig = dev[1].request("SIGNAL_POLL").splitlines()
         hwsim_utils.test_connectivity(dev[0], dev[1])
         dev[1].request("DISCONNECT")
         dev[1].wait_disconnected()
-        if "FREQUENCY=5745" not in sig:
+        if "FREQUENCY=" + str(freq) not in sig:
             raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig))
         if "WIDTH=80 MHz" not in sig:
             raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))