]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Automatic channel selection with freqlist set
authorJouni Malinen <jouni@codeaurora.org>
Fri, 20 Dec 2019 11:41:57 +0000 (13:41 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 20 Dec 2019 11:41:57 +0000 (13:41 +0200)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_ap_acs.py

index 93170dc12b2a1ed19a626e7be951d5428312a139..3cade3ca4ef82b57739f63e69ed2d83981d5dc62 100644 (file)
@@ -89,6 +89,21 @@ def test_ap_acs_chanlist(dev, apdev):
 
     dev[0].connect("test-acs", psk="12345678", scan_freq=freq)
 
+def test_ap_acs_freqlist(dev, apdev):
+    """Automatic channel selection with freqlist set"""
+    force_prev_ap_on_24g(apdev[0])
+    params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
+    params['channel'] = '0'
+    params['freqlist'] = '2412 2437 2462'
+    hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
+    wait_acs(hapd)
+
+    freq = int(hapd.get_status_field("freq"))
+    if freq not in [2412, 2437, 2462]:
+        raise Exception("Unexpected frequency: " + freq)
+
+    dev[0].connect("test-acs", psk="12345678", scan_freq=str(freq))
+
 def test_ap_acs_invalid_chanlist(dev, apdev):
     """Automatic channel selection with invalid chanlist"""
     force_prev_ap_on_24g(apdev[0])