diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py index 0062d809d..85ab35ce3 100644 --- a/tests/hwsim/test_ap_dynamic.py +++ b/tests/hwsim/test_ap_dynamic.py @@ -317,9 +317,8 @@ def test_ap_enable_disable_reenable(dev, apdev): def test_ap_double_disable(dev, apdev): """Double DISABLE regression test""" - hostapd.add_bss(apdev[0], apdev[0]['ifname'], 'bss-1.conf') + hapd = hostapd.add_bss(apdev[0], apdev[0]['ifname'], 'bss-1.conf') hostapd.add_bss(apdev[0], apdev[0]['ifname'] + '-2', 'bss-2.conf') - hapd = hostapd.Hostapd(apdev[0]['ifname']) hapd.disable() if "FAIL" not in hapd.request("DISABLE"): raise Exception("Second DISABLE accepted unexpectedly") @@ -421,14 +420,11 @@ def test_ap_multi_bss(dev, apdev): """Multiple BSSes with hostapd""" ifname1 = apdev[0]['ifname'] ifname2 = apdev[0]['ifname'] + '-2' - hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf') - hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf') + hapd1 = hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf') + hapd2 = hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf') dev[0].connect("bss-1", key_mgmt="NONE", scan_freq="2412") dev[1].connect("bss-2", key_mgmt="NONE", scan_freq="2412") - hapd1 = hostapd.Hostapd(ifname1) - hapd2 = hostapd.Hostapd(ifname2) - hwsim_utils.test_connectivity(dev[0], hapd1) hwsim_utils.test_connectivity(dev[1], hapd2) diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index e193faf30..4f178a4e1 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -2255,8 +2255,7 @@ def test_ap_wps_auto_setup_with_config_file(dev, apdev): f.write("ssid=wps\n") f.write("eap_server=1\n") f.write("wps_state=1\n") - hostapd.add_bss(apdev[0], ifname, conffile) - hapd = hostapd.Hostapd(ifname) + hapd = hostapd.add_bss(apdev[0], ifname, conffile) hapd.request("WPS_PBC") dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412") dev[0].request("WPS_PBC " + apdev[0]['bssid'])