tests: Add hostapd interface with driver specified

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2015-07-17 23:57:04 +03:00 committed by Jouni Malinen
parent fab51186dc
commit 087632168b
2 changed files with 22 additions and 2 deletions

View file

@ -47,8 +47,11 @@ class HostapdGlobal:
def request(self, cmd):
return self.ctrl.request(cmd)
def add(self, ifname):
res = self.ctrl.request("ADD " + ifname + " " + hapd_ctrl)
def add(self, ifname, driver=None):
cmd = "ADD " + ifname + " " + hapd_ctrl
if driver:
cmd += " " + driver
res = self.ctrl.request(cmd)
if not "OK" in res:
raise Exception("Could not add hostapd interface " + ifname)