tests: Pass full apdev to add_ap() function (6)

Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (6) converts the cases where apdevs[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
This commit is contained in:
Janusz Dziedzic 2016-03-30 10:55:56 +02:00 committed by Jouni Malinen
parent 4a264a6fa1
commit eb2af30ac2

View file

@ -44,7 +44,7 @@ def _test_ip4_gtk_drop(devs, apdevs, params, dst):
raise HwsimSkip("kernel doesn't have capability")
ap_params = { 'ssid': 'open', 'channel': '5' }
hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
hapd = hostapd.add_ap(apdevs[0], ap_params)
dev.connect('open', key_mgmt="NONE", scan_freq="2432")
with IPAssign(dev.ifname, '10.0.0.1/24'):
@ -93,7 +93,7 @@ def _test_ip6_gtk_drop(devs, apdevs, params, dst):
raise HwsimSkip("kernel doesn't have capability")
ap_params = { 'ssid': 'open', 'channel': '5' }
hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
hapd = hostapd.add_ap(apdevs[0], ap_params)
dev.connect('open', key_mgmt="NONE", scan_freq="2432")
with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True):
@ -142,7 +142,7 @@ def test_ip4_drop_gratuitous_arp(devs, apdevs, params):
raise HwsimSkip("kernel doesn't have capability")
ap_params = { 'ssid': 'open', 'channel': '5' }
hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
hapd = hostapd.add_ap(apdevs[0], ap_params)
dev.connect('open', key_mgmt="NONE", scan_freq="2432")
with IPAssign(dev.ifname, '10.0.0.2/24'):
@ -185,7 +185,7 @@ def test_ip6_drop_unsolicited_na(devs, apdevs, params):
raise HwsimSkip("kernel doesn't have capability")
ap_params = { 'ssid': 'open', 'channel': '5' }
hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
hapd = hostapd.add_ap(apdevs[0], ap_params)
dev.connect('open', key_mgmt="NONE", scan_freq="2432")
with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True):