From 375afd7cf83fa34696a01b5d5d4998bc2ef37322 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 13 Mar 2014 22:56:07 +0200 Subject: [PATCH] tests: WPS reconfiguration to open network Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_wps.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 09b5b6858..3680f6ddd 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -423,6 +423,23 @@ def test_ap_wps_reg_config(dev, apdev): if status['key_mgmt'] != 'WPA2-PSK': raise Exception("Unexpected key_mgmt") + logger.info("Re-configure back to open") + dev[0].request("REMOVE_NETWORK all") + dev[0].request("BSS_FLUSH 0") + dev[0].request("SCAN freq=2412 only_new=1") + ev = dev[0].wait_event(["CTRL-EVENT-SCAN-RESULTS"], 15) + if ev is None: + raise Exception("Scan timed out") + dev[0].dump_monitor() + dev[0].wps_reg(apdev[0]['bssid'], appin, "wps-open", "OPEN", "NONE", "") + status = dev[0].get_status() + if status['wpa_state'] != 'COMPLETED' or status['bssid'] != apdev[0]['bssid']: + raise Exception("Not fully connected") + if status['ssid'] != "wps-open": + raise Exception("Unexpected SSID") + if status['key_mgmt'] != 'NONE': + raise Exception("Unexpected key_mgmt") + def test_ap_wps_reg_config_tkip(dev, apdev): """WPS registrar configuring AP to use TKIP and AP upgrading to TKIP+CCMP""" ssid = "test-wps-init-ap"