ifname2 = apdev[0]['ifname'] + '-2'
ifname3 = apdev[0]['ifname'] + '-3'
logger.info("Set up three BSSes one by one")
- hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
multi_check(dev, [ True, False, False ])
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
multi_check(dev, [ True, True, False ])
- hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
+ hostapd.add_bss(apdev[0], ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove the last BSS and re-add it")
hostapd.remove_bss(apdev[0], ifname3)
multi_check(dev, [ True, True, False ])
- hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
+ hostapd.add_bss(apdev[0], ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove the middle BSS and re-add it")
hostapd.remove_bss(apdev[0], ifname2)
multi_check(dev, [ True, False, True ])
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove the first BSS and re-add it and other BSSs")
hostapd.remove_bss(apdev[0], ifname1)
multi_check(dev, [ False, False, False ])
- hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
- hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove two BSSes and re-add them")
multi_check(dev, [ True, False, True ])
hostapd.remove_bss(apdev[0], ifname3)
multi_check(dev, [ True, False, False ])
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
multi_check(dev, [ True, True, False ])
- hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
+ hostapd.add_bss(apdev[0], ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Remove three BSSes in and re-add them")
multi_check(dev, [ True, False, False ])
hostapd.remove_bss(apdev[0], ifname1)
multi_check(dev, [ False, False, False ])
- hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
multi_check(dev, [ True, False, False ])
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
multi_check(dev, [ True, True, False ])
- hostapd.add_bss('phy3', ifname3, 'bss-3.conf')
+ hostapd.add_bss(apdev[0], ifname3, 'bss-3.conf')
multi_check(dev, [ True, True, True ])
logger.info("Test error handling if a duplicate ifname is tried")
- hostapd.add_bss('phy3', ifname3, 'bss-3.conf', ignore_error=True)
+ hostapd.add_bss(apdev[0], ifname3, 'bss-3.conf', ignore_error=True)
multi_check(dev, [ True, True, True ])
def test_ap_bss_add_remove_during_ht_scan(dev, apdev):
dev[i].flush_scan_cache()
ifname1 = apdev[0]['ifname']
ifname2 = apdev[0]['ifname'] + '-2'
- hostapd.add_bss('phy3', ifname1, 'bss-ht40-1.conf')
- hostapd.add_bss('phy3', ifname2, 'bss-ht40-2.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-ht40-1.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-ht40-2.conf')
multi_check(dev, [ True, True ], scan_opt=False)
hostapd.remove_bss(apdev[0], ifname2)
hostapd.remove_bss(apdev[0], ifname1)
- hostapd.add_bss('phy3', ifname1, 'bss-ht40-1.conf')
- hostapd.add_bss('phy3', ifname2, 'bss-ht40-2.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-ht40-1.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-ht40-2.conf')
hostapd.remove_bss(apdev[0], ifname2)
multi_check(dev, [ True, False ], scan_opt=False)
hostapd.remove_bss(apdev[0], ifname1)
- hostapd.add_bss('phy3', ifname1, 'bss-ht40-1.conf')
- hostapd.add_bss('phy3', ifname2, 'bss-ht40-2.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-ht40-1.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-ht40-2.conf')
hostapd.remove_bss(apdev[0], ifname1)
multi_check(dev, [ False, False ])
def test_ap_double_disable(dev, apdev):
"""Double DISABLE regression test"""
- hostapd.add_bss('phy3', apdev[0]['ifname'], 'bss-1.conf')
- hostapd.add_bss('phy3', apdev[0]['ifname'] + '-2', 'bss-2.conf')
+ 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"):
def _test_ap_bss_add_many(dev, apdev):
ifname = apdev[0]['ifname']
- phy = 'phy3'
- hostapd.add_bss(phy, ifname, 'bss-1.conf')
+ hostapd.add_bss(apdev[0], ifname, 'bss-1.conf')
hapd = hostapd.HostapdGlobal()
fname = '/tmp/hwsim-bss.conf'
for i in range(16):
f.write("bssid=02:00:00:00:03:%02x\n" % (i + 1))
f.write("ctrl_interface=/var/run/hostapd\n")
f.write("ssid=test-%d\n" % i)
- hostapd.add_bss(phy, ifname2, fname)
+ hostapd.add_bss(apdev[0], ifname2, fname)
os.remove(fname)
dev[0].request("SCAN_INTERVAL 1")
"""Dynamic BSS add operation reusing existing interface"""
ifname1 = apdev[0]['ifname']
ifname2 = apdev[0]['ifname'] + '-2'
- hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
subprocess.check_call(["iw", "dev", ifname1, "interface", "add", ifname2,
"type", "__ap"])
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
hostapd.remove_bss(apdev[0], ifname2)
subprocess.check_call(["iw", "dev", ifname2, "del"])
hapd_bss_out_of_mem(hapd2, 'phy3', 'bss-1.conf',
1, 'ieee802_11_build_ap_params')
- hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
hapd_bss_out_of_mem(hapd2, 'phy3', 'bss-2.conf',
1, 'hostapd_interface_init_bss')
hapd_bss_out_of_mem(hapd2, 'phy3', 'bss-2.conf',
1, 'ieee802_11_build_ap_params')
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
hostapd.remove_bss(apdev[0], ifname2)
hostapd.remove_bss(apdev[0], ifname1)
"""Multiple BSSes with hostapd"""
ifname1 = apdev[0]['ifname']
ifname2 = apdev[0]['ifname'] + '-2'
- hostapd.add_bss('phy3', ifname1, 'bss-1.conf')
- hostapd.add_bss('phy3', ifname2, 'bss-2.conf')
+ hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
+ 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")