tests: wpa_supplicant AP with all possible 20 MHz PRI for 80 MHz channel

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2023-10-27 13:49:48 +03:00 committed by Jouni Malinen
parent a6440b57cf
commit 3d8215affe

View file

@ -743,29 +743,44 @@ def test_wpas_ap_open_vht80(dev):
dev[1].flush_scan_cache()
def test_wpas_ap_open_vht80_us(dev):
"""wpa_supplicant AP mode - VHT 80 MHz (US)"""
"""wpa_supplicant AP mode - VHT 80 MHz (US) channel 149"""
run_wpas_ap_open_vht80_us(dev, 5745, 5775, 1)
def test_wpas_ap_open_vht80_us_153(dev):
"""wpa_supplicant AP mode - VHT 80 MHz (US) channel 153"""
run_wpas_ap_open_vht80_us(dev, 5765, 5775, -1)
def test_wpas_ap_open_vht80_us_157(dev):
"""wpa_supplicant AP mode - VHT 80 MHz (US) channel 157"""
run_wpas_ap_open_vht80_us(dev, 5785, 5775, 1)
def test_wpas_ap_open_vht80_us_161(dev):
"""wpa_supplicant AP mode - VHT 80 MHz (US) channel 161"""
run_wpas_ap_open_vht80_us(dev, 5805, 5775, -1)
def run_wpas_ap_open_vht80_us(dev, freq, center_freq, ht40):
id = dev[0].add_network()
dev[0].set("country", "US")
try:
dev[0].set_network(id, "mode", "2")
dev[0].set_network_quoted(id, "ssid", "wpas-ap-open")
dev[0].set_network(id, "key_mgmt", "NONE")
dev[0].set_network(id, "frequency", "5745")
dev[0].set_network(id, "scan_freq", "5745")
dev[0].set_network(id, "frequency", str(freq))
dev[0].set_network(id, "scan_freq", str(freq))
dev[0].set_network(id, "vht", "1")
dev[0].set_network(id, "vht_center_freq1", "5775")
dev[0].set_network(id, "vht_center_freq1", str(center_freq))
dev[0].set_network(id, "max_oper_chwidth", "1")
dev[0].set_network(id, "ht40", "1")
dev[0].set_network(id, "ht40", str(ht40))
dev[0].select_network(id)
wait_ap_ready(dev[0])
dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq="5745")
dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq=str(freq))
log_channel_info(dev[1])
sig = dev[1].request("SIGNAL_POLL").splitlines()
hwsim_utils.test_connectivity(dev[0], dev[1])
dev[1].request("DISCONNECT")
dev[1].wait_disconnected()
if "FREQUENCY=5745" not in sig:
if "FREQUENCY=" + str(freq) not in sig:
raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig))
if "WIDTH=80 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))