diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index 63a2ed5f6..1b44de0ef 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -92,7 +92,7 @@ def test_ap_wps_conf_pin(dev, apdev): def test_ap_wps_reg_connect(dev, apdev): """WPS registrar using AP PIN to connect""" - ssid = "test-wps-conf-ap-pin" + ssid = "test-wps-reg-ap-pin" appin = "12345670" hostapd.add_ap(apdev[0]['ifname'], { "ssid": ssid, "eap_server": "1", "wps_state": "2", @@ -100,7 +100,8 @@ def test_ap_wps_reg_connect(dev, apdev): "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP", "ap_pin": appin}) logger.info("WPS provisioning step") - dev[0].request("BSS_FLUSH") + dev[0].request("BSS_FLUSH 0") + dev[0].request("SET ignore_old_scan_res 1") dev[0].dump_monitor() dev[0].request("WPS_REG " + apdev[0]['bssid'] + " " + appin) ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=15) @@ -124,7 +125,8 @@ def test_ap_wps_reg_config(dev, apdev): { "ssid": ssid, "eap_server": "1", "wps_state": "2", "ap_pin": appin}) logger.info("WPS configuration step") - dev[0].request("BSS_FLUSH") + dev[0].request("BSS_FLUSH 0") + dev[0].request("SET ignore_old_scan_res 1") dev[0].dump_monitor() new_ssid = "wps-new-ssid" new_passphrase = "1234567890" @@ -175,8 +177,10 @@ def test_ap_wps_pbc_overlap_2sta(dev, apdev): hapd = hostapd.Hostapd(apdev[0]['ifname']) logger.info("WPS provisioning step") hapd.request("WPS_PBC") - dev[0].request("BSS_FLUSH") - dev[1].request("BSS_FLUSH") + dev[0].request("SET ignore_old_scan_res 1") + dev[0].request("BSS_FLUSH 0") + dev[1].request("SET ignore_old_scan_res 1") + dev[1].request("BSS_FLUSH 0") dev[0].dump_monitor() dev[1].dump_monitor() dev[0].request("WPS_PBC") diff --git a/tests/hwsim/wpasupplicant.py b/tests/hwsim/wpasupplicant.py index 03017061b..d151a3fb8 100644 --- a/tests/hwsim/wpasupplicant.py +++ b/tests/hwsim/wpasupplicant.py @@ -45,6 +45,7 @@ class WpaSupplicant: self.request("REMOVE_CRED *") self.request("SET tdls_disabled 0") self.request("SET tdls_testing 0") + self.request("SET ignore_old_scan_res 0") self.group_ifname = None def add_network(self):