tests: acs_exclude_dfs=1
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
c6ab7b55a6
commit
2d53b0c3d2
1 changed files with 36 additions and 0 deletions
|
@ -400,6 +400,42 @@ def test_ap_acs_dfs(dev, apdev, params):
|
|||
dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
|
||||
dev[0].flush_scan_cache()
|
||||
|
||||
def test_ap_acs_exclude_dfs(dev, apdev, params):
|
||||
"""Automatic channel selection, exclude DFS"""
|
||||
try:
|
||||
hapd = None
|
||||
force_prev_ap_on_5g(apdev[0])
|
||||
params = hostapd.wpa2_params(ssid="test-acs", passphrase="12345678")
|
||||
params['hw_mode'] = 'a'
|
||||
params['channel'] = '0'
|
||||
params['ht_capab'] = '[HT40+]'
|
||||
params['country_code'] = 'US'
|
||||
params['ieee80211d'] = '1'
|
||||
params['ieee80211h'] = '1'
|
||||
params['acs_num_scans'] = '1'
|
||||
params['acs_exclude_dfs'] = '1'
|
||||
hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
|
||||
wait_acs(hapd)
|
||||
|
||||
state = hapd.get_status_field("state")
|
||||
if state != "ENABLED":
|
||||
raise Exception("Unexpected interface state")
|
||||
|
||||
freq = int(hapd.get_status_field("freq"))
|
||||
if freq in [5260, 5280, 5300, 5320,
|
||||
5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680]:
|
||||
raise Exception("Unexpected frequency: %d" % freq)
|
||||
|
||||
dev[0].connect("test-acs", psk="12345678", scan_freq=str(freq))
|
||||
dev[0].wait_regdom(country_ie=True)
|
||||
finally:
|
||||
if hapd:
|
||||
hapd.request("DISABLE")
|
||||
dev[0].disconnect_and_stop_scan()
|
||||
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
||||
dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
|
||||
dev[0].flush_scan_cache()
|
||||
|
||||
def test_ap_acs_vht160_dfs(dev, apdev, params):
|
||||
"""Automatic channel selection 160 MHz, HT scan, and DFS [long]"""
|
||||
if not params['long']:
|
||||
|
|
Loading…
Reference in a new issue