tests: wpa_supplicant AP mode - HT disabled

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2017-03-11 11:20:17 +02:00
parent b07ff9cb04
commit 3d745aa7cb

View file

@ -676,3 +676,44 @@ def test_wpas_ap_open_vht80(dev):
set_country("00")
dev[0].set("country", "00")
dev[1].flush_scan_cache()
def test_wpas_ap_no_ht(dev):
"""wpa_supplicant AP mode - HT disabled"""
id = dev[0].add_network()
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", "2412")
dev[0].set_network(id, "scan_freq", "2412")
dev[0].set_network(id, "ht", "0")
dev[0].set_network(id, "wps_disabled", "1")
dev[0].select_network(id)
wait_ap_ready(dev[0])
dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq="2412")
sig = dev[1].request("SIGNAL_POLL").splitlines()
dev[1].request("DISCONNECT")
dev[1].wait_disconnected()
dev[0].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
id = dev[0].add_network()
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", "2412")
dev[0].set_network(id, "scan_freq", "2412")
dev[0].set_network(id, "wps_disabled", "1")
dev[0].select_network(id)
wait_ap_ready(dev[0])
dev[1].flush_scan_cache()
dev[1].connect("wpas-ap-open", key_mgmt="NONE", scan_freq="2412")
sig2 = dev[1].request("SIGNAL_POLL").splitlines()
dev[1].request("DISCONNECT")
dev[1].wait_disconnected()
dev[0].request("REMOVE_NETWORK all")
dev[0].wait_disconnected()
if "WIDTH=20 MHz (no HT)" not in sig:
raise Exception("HT was not disabled: " + str(sig))
if "WIDTH=20 MHz" not in sig2:
raise Exception("HT was not enabled: " + str(sig2))