From: Jouni Malinen Date: Thu, 29 Dec 2016 10:10:01 +0000 (+0200) Subject: tests: Automatic channel selection using acs_survey parameter X-Git-Tag: hostap_2_7~1877 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f37d1b31eff4443a3603c3e09d9d30d7f5b4ce3;p=thirdparty%2Fhostap.git tests: Automatic channel selection using acs_survey parameter Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_acs.py b/tests/hwsim/test_ap_acs.py index fbfecb770..84d2bb677 100644 --- a/tests/hwsim/test_ap_acs.py +++ b/tests/hwsim/test_ap_acs.py @@ -220,3 +220,18 @@ def test_ap_acs_bias(dev, apdev): raise Exception("Unexpected frequency") dev[0].connect("test-acs", psk="12345678", scan_freq=freq) + +def test_ap_acs_survey(dev, apdev): + """Automatic channel selection using acs_survey parameter""" + force_prev_ap_on_24g(apdev[0]) + params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678") + params['channel'] = 'acs_survey' + params['acs_num_scans'] = '1' + hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False) + wait_acs(hapd) + + freq = hapd.get_status_field("freq") + if int(freq) < 2400: + raise Exception("Unexpected frequency") + + dev[0].connect("test-acs", psk="12345678", scan_freq=freq)