From 3d745aa7cb5100694f62c091a36b584df0623d4a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 11 Mar 2017 11:20:17 +0200 Subject: [PATCH] tests: wpa_supplicant AP mode - HT disabled Signed-off-by: Jouni Malinen --- tests/hwsim/test_wpas_ap.py | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/hwsim/test_wpas_ap.py b/tests/hwsim/test_wpas_ap.py index 3ee8884f1..82857f8ba 100644 --- a/tests/hwsim/test_wpas_ap.py +++ b/tests/hwsim/test_wpas_ap.py @@ -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))