]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Automatic channel selection and 2.4 GHz channel 14
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 22 Sep 2022 21:25:24 +0000 (00:25 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 22 Sep 2022 21:25:24 +0000 (00:25 +0300)
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_ap_acs.py

index 8fc5ec4f3a69dfcce3a76d7c3fbd920b8f02d7e9..b413977d2ead8e883f22e602448b5a24618f646d 100644 (file)
@@ -686,3 +686,26 @@ def test_ap_acs_he_24g_overlap(dev, apdev):
         raise Exception("Unexpected frequency")
 
     dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
+
+def test_ap_acs_chan14(dev, apdev):
+    """Automatic channel selection and 2.4 GHz channel 14"""
+    try:
+        hapd = None
+        force_prev_ap_on_24g(apdev[0])
+        params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
+        params['hw_mode'] = 'g'
+        params['channel'] = '0'
+        params['country_code'] = 'JP'
+        params['acs_chan_bias'] = '14:0.01'
+        hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
+        wait_acs(hapd)
+        freq = hapd.get_status_field("freq")
+        if int(freq) != 2484:
+            raise Exception("Unexpected frequency: " + str(freq))
+        if hapd.get_status_field("ieee80211n") != "0":
+            raise Exception("HT enabled unexpectedly")
+
+        dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
+        dev[0].wait_regdom(country_ie=True)
+    finally:
+        clear_regdom(hapd, dev)