tests: VHT with 160 MHz channel width and no DFS

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-10-29 22:51:49 +02:00 committed by Jouni Malinen
parent 45c3e72952
commit a6cc1e5747

View file

@ -334,6 +334,50 @@ def test_ap_vht160(dev, apdev):
dev[0].flush_scan_cache() dev[0].flush_scan_cache()
dev[1].flush_scan_cache() dev[1].flush_scan_cache()
def test_ap_vht160_no_dfs(dev, apdev):
"""VHT with 160 MHz channel width and no DFS"""
try:
hapd = None
params = { "ssid": "vht",
"country_code": "ZA",
"hw_mode": "a",
"channel": "104",
"ht_capab": "[HT40-]",
"ieee80211n": "1",
"ieee80211ac": "1",
"vht_oper_chwidth": "2",
"vht_oper_centr_freq_seg0_idx": "114",
'ieee80211d': '1',
'ieee80211h': '1' }
hapd = hostapd.add_ap(apdev[0]['ifname'], params, wait_enabled=False)
ev = hapd.wait_event(["AP-ENABLED"], timeout=2)
if not ev:
cmd = subprocess.Popen(["iw", "reg", "get"], stdout=subprocess.PIPE)
reg = cmd.stdout.readlines()
for r in reg:
if "5490" in r and "DFS" in r:
raise HwsimSkip("ZA regulatory rule did not have DFS requirement removed")
raise Exception("AP setup timed out")
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5520")
hwsim_utils.test_connectivity(dev[0], hapd)
sig = dev[0].request("SIGNAL_POLL").splitlines()
if "FREQUENCY=5520" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig))
if "WIDTH=160 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))
except Exception, e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
if not vht_supported():
raise HwsimSkip("80/160 MHz channel not supported in regulatory information")
raise
finally:
dev[0].request("DISCONNECT")
if hapd:
hapd.request("DISABLE")
subprocess.call(['iw', 'reg', 'set', '00'])
dev[0].flush_scan_cache()
def test_ap_vht80plus80(dev, apdev): def test_ap_vht80plus80(dev, apdev):
"""VHT with 80+80 MHz channel width""" """VHT with 80+80 MHz channel width"""
try: try: