tests: Pass apdev to HostapdGlobal()
This can be used to work with remote hosts. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
parent
1728a2e73c
commit
dc6342de92
5 changed files with 7 additions and 7 deletions
|
@ -338,7 +338,7 @@ def test_ap_bss_add_many(dev, apdev):
|
|||
finally:
|
||||
dev[0].request("SCAN_INTERVAL 5")
|
||||
ifname = apdev[0]['ifname']
|
||||
hapd = hostapd.HostapdGlobal()
|
||||
hapd = hostapd.HostapdGlobal(apdev[0])
|
||||
hapd.flush()
|
||||
for i in range(16):
|
||||
ifname2 = ifname + '-' + str(i)
|
||||
|
|
|
@ -1732,7 +1732,7 @@ def test_ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res(dev, apdev):
|
|||
"ignore_broadcast_ssid": "1" })
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
hapd.disable()
|
||||
hapd_global = hostapd.HostapdGlobal()
|
||||
hapd_global = hostapd.HostapdGlobal(apdev[0])
|
||||
hapd_global.flush()
|
||||
hapd_global.remove(apdev[0]['ifname'])
|
||||
|
||||
|
@ -2898,7 +2898,7 @@ def test_ap_hs20_hidden_ssid_in_scan_res(dev, apdev):
|
|||
"ignore_broadcast_ssid": "1" })
|
||||
dev[0].scan_for_bss(bssid, freq=2412)
|
||||
hapd.disable()
|
||||
hapd_global = hostapd.HostapdGlobal()
|
||||
hapd_global = hostapd.HostapdGlobal(apdev[0])
|
||||
hapd_global.flush()
|
||||
hapd_global.remove(apdev[0]['ifname'])
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ def test_hapd_ctrl_global(dev, apdev):
|
|||
params = { "ssid": ssid }
|
||||
ifname = apdev[0]['ifname']
|
||||
hapd = hostapd.add_ap(apdev[0], params)
|
||||
hapd_global = hostapd.HostapdGlobal()
|
||||
hapd_global = hostapd.HostapdGlobal(apdev[0])
|
||||
res = hapd_global.request("IFNAME=" + ifname + " PING")
|
||||
if "PONG" not in res:
|
||||
raise Exception("Could not ping hostapd interface " + ifname + " via global control interface")
|
||||
|
|
|
@ -756,7 +756,7 @@ def test_pmksa_cache_size_limit(dev, apdev):
|
|||
_test_pmksa_cache_size_limit(dev, apdev)
|
||||
finally:
|
||||
try:
|
||||
hapd = hostapd.HostapdGlobal()
|
||||
hapd = hostapd.HostapdGlobal(apdev[0])
|
||||
hapd.flush()
|
||||
hapd.remove(apdev[0]['ifname'])
|
||||
except:
|
||||
|
@ -791,7 +791,7 @@ def _test_pmksa_cache_size_limit(dev, apdev):
|
|||
elif i + 1 != entries:
|
||||
raise Exception("Unexpected number of PMKSA entries")
|
||||
|
||||
hapd = hostapd.HostapdGlobal()
|
||||
hapd = hostapd.HostapdGlobal(apdev[0])
|
||||
hapd.flush()
|
||||
hapd.remove(apdev[0]['ifname'])
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ def test_rfkill_hostapd(dev, apdev):
|
|||
dev[0].request("DISCONNECT")
|
||||
hapd.disable()
|
||||
|
||||
hglobal = HostapdGlobal()
|
||||
hglobal = HostapdGlobal(apdev[0])
|
||||
hglobal.flush()
|
||||
hglobal.remove(apdev[0]['ifname'])
|
||||
|
||||
|
|
Loading…
Reference in a new issue