tests: VHT 160 MHz tests with all different HT primary channels

This extends previous ap_vht160_no_dfs test case coverage by running the
same test case with each of the possible HT primary channel
alternatives.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-12-26 12:43:06 +02:00
parent 7a92dbd792
commit 90bef2c9c3

View file

@ -414,15 +414,46 @@ 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_100_plus(dev, apdev):
"""VHT with 160 MHz channel width and no DFS (100 plus)"""
run_ap_vht160_no_dfs(dev, apdev, "100", "[HT40+]")
def test_ap_vht160_no_dfs(dev, apdev): def test_ap_vht160_no_dfs(dev, apdev):
"""VHT with 160 MHz channel width and no DFS""" """VHT with 160 MHz channel width and no DFS (104 minus)"""
run_ap_vht160_no_dfs(dev, apdev, "104", "[HT40-]")
def test_ap_vht160_no_dfs_108_plus(dev, apdev):
"""VHT with 160 MHz channel width and no DFS (108 plus)"""
run_ap_vht160_no_dfs(dev, apdev, "108", "[HT40+]")
def test_ap_vht160_no_dfs_112_minus(dev, apdev):
"""VHT with 160 MHz channel width and no DFS (112 minus)"""
run_ap_vht160_no_dfs(dev, apdev, "112", "[HT40-]")
def test_ap_vht160_no_dfs_116_plus(dev, apdev):
"""VHT with 160 MHz channel width and no DFS (116 plus)"""
run_ap_vht160_no_dfs(dev, apdev, "116", "[HT40+]")
def test_ap_vht160_no_dfs_120_minus(dev, apdev):
"""VHT with 160 MHz channel width and no DFS (120 minus)"""
run_ap_vht160_no_dfs(dev, apdev, "120", "[HT40-]")
def test_ap_vht160_no_dfs_124_plus(dev, apdev):
"""VHT with 160 MHz channel width and no DFS (124 plus)"""
run_ap_vht160_no_dfs(dev, apdev, "124", "[HT40+]")
def test_ap_vht160_no_dfs_128_minus(dev, apdev):
"""VHT with 160 MHz channel width and no DFS (128 minus)"""
run_ap_vht160_no_dfs(dev, apdev, "128", "[HT40-]")
def run_ap_vht160_no_dfs(dev, apdev, channel, ht_capab):
try: try:
hapd = None hapd = None
params = { "ssid": "vht", params = { "ssid": "vht",
"country_code": "ZA", "country_code": "ZA",
"hw_mode": "a", "hw_mode": "a",
"channel": "104", "channel": channel,
"ht_capab": "[HT40-]", "ht_capab": ht_capab,
"ieee80211n": "1", "ieee80211n": "1",
"ieee80211ac": "1", "ieee80211ac": "1",
"vht_oper_chwidth": "2", "vht_oper_chwidth": "2",
@ -439,10 +470,11 @@ def test_ap_vht160_no_dfs(dev, apdev):
raise HwsimSkip("ZA regulatory rule did not have DFS requirement removed") raise HwsimSkip("ZA regulatory rule did not have DFS requirement removed")
raise Exception("AP setup timed out") raise Exception("AP setup timed out")
dev[0].connect("vht", key_mgmt="NONE", scan_freq="5520") freq = str(int(channel) * 5 + 5000)
dev[0].connect("vht", key_mgmt="NONE", scan_freq=freq)
hwsim_utils.test_connectivity(dev[0], hapd) hwsim_utils.test_connectivity(dev[0], hapd)
sig = dev[0].request("SIGNAL_POLL").splitlines() sig = dev[0].request("SIGNAL_POLL").splitlines()
if "FREQUENCY=5520" not in sig: if "FREQUENCY=" + freq not in sig:
raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig)) raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig))
if "WIDTH=160 MHz" not in sig: if "WIDTH=160 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig)) raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))