diff --git a/tests/hwsim/test_ap_acs.py b/tests/hwsim/test_ap_acs.py index ca707092a..71feb765b 100644 --- a/tests/hwsim/test_ap_acs.py +++ b/tests/hwsim/test_ap_acs.py @@ -16,7 +16,7 @@ from test_ap_ht import clear_scan_cache def force_prev_ap_on_24g(ap): # For now, make sure the last operating channel was on 2.4 GHz band to get # sufficient survey data from mac80211_hwsim. - hostapd.add_ap(ap['ifname'], { "ssid": "open" }) + hostapd.add_ap(ap, { "ssid": "open" }) time.sleep(0.1) hapd_global = hostapd.HostapdGlobal() hapd_global.remove(ap['ifname']) @@ -24,8 +24,8 @@ def force_prev_ap_on_24g(ap): def force_prev_ap_on_5g(ap): # For now, make sure the last operating channel was on 5 GHz band to get # sufficient survey data from mac80211_hwsim. - hostapd.add_ap(ap['ifname'], { "ssid": "open", "hw_mode": "a", - "channel": "36", "country_code": "US" }) + hostapd.add_ap(ap, { "ssid": "open", "hw_mode": "a", + "channel": "36", "country_code": "US" }) time.sleep(0.1) hapd_global = hostapd.HostapdGlobal() hapd_global.remove(ap['ifname']) diff --git a/tests/hwsim/test_ap_ciphers.py b/tests/hwsim/test_ap_ciphers.py index 352de9e71..6cde14a46 100644 --- a/tests/hwsim/test_ap_ciphers.py +++ b/tests/hwsim/test_ap_ciphers.py @@ -22,7 +22,7 @@ def check_cipher(dev, ap, cipher): "wpa": "2", "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": cipher } - hapd = hostapd.add_ap(ap['ifname'], params) + hapd = hostapd.add_ap(ap, params) dev.connect("test-wpa2-psk", psk="12345678", pairwise=cipher, group=cipher, scan_freq="2412") hwsim_utils.test_connectivity(dev, hapd) @@ -41,7 +41,7 @@ def check_group_mgmt_cipher(dev, ap, cipher): "wpa_key_mgmt": "WPA-PSK-SHA256", "rsn_pairwise": "CCMP", "group_mgmt_cipher": cipher } - hapd = hostapd.add_ap(ap['ifname'], params) + hapd = hostapd.add_ap(ap, params) dev.connect("test-wpa2-psk-pmf", psk="12345678", ieee80211w="2", key_mgmt="WPA-PSK-SHA256", pairwise="CCMP", group="CCMP", scan_freq="2412") diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py index f02138cd9..1d449a1c1 100644 --- a/tests/hwsim/test_ap_hs20.py +++ b/tests/hwsim/test_ap_hs20.py @@ -412,7 +412,7 @@ def hs20_simulated_sim(dev, ap, method): params['hessid'] = bssid params['anqp_3gpp_cell_net'] = "555,444" params['domain_name'] = "wlan.mnc444.mcc555.3gppnetwork.org" - hostapd.add_ap(ap['ifname'], params) + hostapd.add_ap(ap, params) dev.hs20_enable() dev.add_cred_values({ 'imsi': "555444-333222111", 'eap': method, @@ -628,7 +628,7 @@ def eap_test(dev, ap, eap_params, method, user): bssid = ap['bssid'] params = hs20_ap_params() params['nai_realm'] = [ "0,example.com," + eap_params ] - hostapd.add_ap(ap['ifname'], params) + hostapd.add_ap(ap, params) dev.hs20_enable() dev.add_cred_values({ 'realm': "example.com", diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py index 3932e5e7d..0db8b227a 100644 --- a/tests/hwsim/test_ap_open.py +++ b/tests/hwsim/test_ap_open.py @@ -191,7 +191,7 @@ def hapd_out_of_mem(hapd, apdev, count, func): with alloc_fail(hapd, count, func): started = False try: - hostapd.add_ap(apdev['ifname'], { "ssid": "open" }) + hostapd.add_ap(apdev, { "ssid": "open" }) started = True except: pass diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index cdf9e02b5..48a3239e9 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -694,7 +694,7 @@ def eapol_test(apdev, dev, wpa2=True): else: params = hostapd.wpa_params(ssid=ssid) params['wpa_psk'] = psk - hapd = hostapd.add_ap(apdev['ifname'], params) + hapd = hostapd.add_ap(apdev, params) hapd.request("SET ext_eapol_frame_io 1") dev.request("SET ext_eapol_frame_io 1") dev.connect(ssid, raw_psk=psk, scan_freq="2412", wait_connect=False) diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py index 0123e4be7..1a2ab1f32 100644 --- a/tests/hwsim/test_ap_vht.py +++ b/tests/hwsim/test_ap_vht.py @@ -75,7 +75,7 @@ def vht80_test(apdev, dev, channel, ht_capab): "ieee80211ac": "1", "vht_oper_chwidth": "1", "vht_oper_centr_freq_seg0_idx": "42" } - hapd = hostapd.add_ap(apdev['ifname'], params) + hapd = hostapd.add_ap(apdev, params) bssid = apdev['bssid'] dev.connect("vht", key_mgmt="NONE", scan_freq=str(5000 + 5 * channel)) @@ -225,7 +225,7 @@ def test_ap_vht_20(devs, apdevs): "supported_rates": "60 120 240 360 480 540", "require_vht": "1", } - hapd = hostapd.add_ap(ap['ifname'], params) + hapd = hostapd.add_ap(ap, params) dev.connect("test-vht20", scan_freq="5180", key_mgmt="NONE") hwsim_utils.test_connectivity(dev, hapd) finally: @@ -252,7 +252,7 @@ def test_ap_vht_40(devs, apdevs): "vht_oper_chwidth": "0", "vht_oper_centr_freq_seg0_idx": "0", } - hapd = hostapd.add_ap(ap['ifname'], params) + hapd = hostapd.add_ap(ap, params) dev.connect("test-vht40", scan_freq="5180", key_mgmt="NONE") hwsim_utils.test_connectivity(dev, hapd) finally: diff --git a/tests/hwsim/test_ap_wps.py b/tests/hwsim/test_ap_wps.py index fe28b4528..ed1de58bc 100644 --- a/tests/hwsim/test_ap_wps.py +++ b/tests/hwsim/test_ap_wps.py @@ -36,7 +36,7 @@ def wps_start_ap(apdev, ssid="test-wps-conf"): params = { "ssid": ssid, "eap_server": "1", "wps_state": "2", "wpa_passphrase": "12345678", "wpa": "2", "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP" } - return hostapd.add_ap(apdev['ifname'], params) + return hostapd.add_ap(apdev, params) def test_ap_wps_init(dev, apdev): """Initial AP configuration with first WPS Enrollee""" @@ -5253,7 +5253,7 @@ def wps_start_ext(apdev, dev, pbc=False, pin=None): params = { "ssid": ssid, "eap_server": "1", "wps_state": "2", "wpa_passphrase": "12345678", "wpa": "2", "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP"} - hapd = hostapd.add_ap(apdev['ifname'], params) + hapd = hostapd.add_ap(apdev, params) if pbc: hapd.request("WPS_PBC") @@ -7656,7 +7656,7 @@ def wps_start_ext_reg(apdev, dev): "wpa_passphrase": "12345678", "wpa": "2", "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP", "ap_pin": appin } - hapd = hostapd.add_ap(apdev['ifname'], params) + hapd = hostapd.add_ap(apdev, params) dev.scan_for_bss(bssid, freq="2412") hapd.request("SET ext_eapol_frame_io 1") diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 1812606f5..d8572dc24 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -99,7 +99,7 @@ def start_ap(ap, ssid="test-wps", "wpa_passphrase": "12345678", "wpa": "2", "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP", "ap_pin": "12345670", "uuid": ap_uuid} - return hostapd.add_ap(ap['ifname'], params) + return hostapd.add_ap(ap, params) def test_dbus_getall(dev, apdev): """D-Bus GetAll""" diff --git a/tests/hwsim/test_erp.py b/tests/hwsim/test_erp.py index 693fec93d..f41b4ba45 100644 --- a/tests/hwsim/test_erp.py +++ b/tests/hwsim/test_erp.py @@ -123,7 +123,7 @@ def start_erp_as(apdev): "eap_fast_a_id_info": "test server", "eap_server_erp": "1", "erp_domain": "example.com" } - hostapd.add_ap(apdev['ifname'], params) + hostapd.add_ap(apdev, params) def test_erp_radius(dev, apdev): """ERP enabled on RADIUS server and peer""" diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index f8d7d215a..f44d71894 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -52,7 +52,7 @@ def hs20_ap_params(): def start_ap(ap): params = hs20_ap_params() params['hessid'] = ap['bssid'] - hostapd.add_ap(ap['ifname'], params) + hostapd.add_ap(ap, params) return hostapd.Hostapd(ap['ifname']) def get_gas_response(dev, bssid, info, allow_fetch_failure=False, diff --git a/tests/hwsim/test_nfc_wps.py b/tests/hwsim/test_nfc_wps.py index 5b797081b..5f7add8cc 100644 --- a/tests/hwsim/test_nfc_wps.py +++ b/tests/hwsim/test_nfc_wps.py @@ -392,7 +392,7 @@ def test_nfc_wps_handover_pk_hash_mismatch_ap(dev, apdev): def start_ap_er(er, ap, ssid): ap_pin = "12345670" ap_uuid = "27ea801a-9e5c-4e73-bd82-f89cbcd10d7e" - hostapd.add_ap(ap['ifname'], + hostapd.add_ap(ap, { "ssid": ssid, "eap_server": "1", "wps_state": "2", "wpa_passphrase": "12345678", "wpa": "2", "wpa_key_mgmt": "WPA-PSK", "rsn_pairwise": "CCMP", diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index 0e6eb349f..724d3f474 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -608,7 +608,7 @@ def sae_reflection_attack(apdev, dev, group): params = hostapd.wpa2_params(ssid="test-sae", passphrase="no-knowledge-of-passphrase") params['wpa_key_mgmt'] = 'SAE' - hapd = hostapd.add_ap(apdev['ifname'], params) + hapd = hostapd.add_ap(apdev, params) bssid = apdev['bssid'] dev.scan_for_bss(bssid, freq=2412) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index d8e9e6f4e..0eb27dab6 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -721,7 +721,7 @@ def start_wnm_tm(ap, country, dev): "hw_mode": "g", "channel": "1", "bss_transition": "1" } - hapd = hostapd.add_ap(ap['ifname'], params) + hapd = hostapd.add_ap(ap, params) id = dev.connect("test-wnm", key_mgmt="NONE", scan_freq="2412") dev.dump_monitor() dev.set_network(id, "scan_freq", "") diff --git a/tests/hwsim/test_wpas_wmm_ac.py b/tests/hwsim/test_wpas_wmm_ac.py index a4ddcb245..10f8f6bfb 100644 --- a/tests/hwsim/test_wpas_wmm_ac.py +++ b/tests/hwsim/test_wpas_wmm_ac.py @@ -20,7 +20,7 @@ def add_wmm_ap(apdev, acm_list): for ac in acm_list: params["wmm_ac_%s_acm" % (ac.lower())] = "1" - return hostapd.add_ap(apdev['ifname'], params) + return hostapd.add_ap(apdev, params) def test_tspec(dev, apdev): """Basic addts/delts tests"""