]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Use hapd from hostapd.add_iface()
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Thu, 7 Apr 2016 05:38:06 +0000 (07:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Apr 2016 16:26:25 +0000 (19:26 +0300)
Since add_iface() now returns the correct hapd, just use it.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
tests/hwsim/test_ap_acs.py
tests/hwsim/test_ap_dynamic.py
tests/hwsim/test_ap_vlan.py

index 05e1ad126e318df0defdb6363ec8ff20d0f975f1..89abb24e6b812c81216f9f3ea0d6da96440aa0d3 100644 (file)
@@ -89,12 +89,10 @@ def test_ap_acs_chanlist(dev, apdev):
 def test_ap_multi_bss_acs(dev, apdev):
     """hostapd start with a multi-BSS configuration file using ACS"""
     skip_with_fips(dev[0])
-    ifname = apdev[0]['ifname']
     force_prev_ap_on_24g(apdev[0])
 
     # start the actual test
-    hostapd.add_iface(apdev[0], 'multi-bss-acs.conf')
-    hapd = hostapd.Hostapd(ifname)
+    hapd = hostapd.add_iface(apdev[0], 'multi-bss-acs.conf')
     hapd.enable()
     wait_acs(hapd)
 
index 76fdaf151cfa9e663a0a1bd0ae28f86baec805f1..7dab735d7f10be20509a27899147388fa68ee1ad 100644 (file)
@@ -182,8 +182,7 @@ def test_ap_multi_bss_config(dev, apdev):
     ifname2 = apdev[0]['ifname'] + '-2'
     ifname3 = apdev[0]['ifname'] + '-3'
     logger.info("Set up three BSSes with one configuration file")
-    hostapd.add_iface(apdev[0], 'multi-bss.conf')
-    hapd = hostapd.Hostapd(ifname1)
+    hapd = hostapd.add_iface(apdev[0], 'multi-bss.conf')
     hapd.enable()
     multi_check(dev, [ True, True, True ])
     hostapd.remove_bss(apdev[0], ifname2)
@@ -193,8 +192,7 @@ def test_ap_multi_bss_config(dev, apdev):
     hostapd.remove_bss(apdev[0], ifname1)
     multi_check(dev, [ False, False, False ])
 
-    hostapd.add_iface(apdev[0], 'multi-bss.conf')
-    hapd = hostapd.Hostapd(ifname1)
+    hapd = hostapd.add_iface(apdev[0], 'multi-bss.conf')
     hapd.enable()
     hostapd.remove_bss(apdev[0], ifname1)
     multi_check(dev, [ False, False, False ])
index 79c4166af25ccbefe82b0ab90aa2fa2882346190..7ca4eda193d91293c05ebcd50834072cceba56fe 100644 (file)
@@ -327,11 +327,8 @@ def ap_vlan_iface_cleanup_multibss(dev, apdev, cfgfile):
                       "vlan_naming": "1" }
         authserv = hostapd.add_ap(apdev[1], as_params)
 
-        ifname = apdev[0]['ifname']
-
         # start the actual test
-        hostapd.add_iface(apdev[0], cfgfile)
-        hapd = hostapd.Hostapd(ifname)
+        hapd = hostapd.add_iface(apdev[0], cfgfile)
         hapd1 = hostapd.Hostapd("wlan3-2", 1)
         hapd1.enable()