|
@@ -275,7 +275,7 @@ class Hostapd:
|
|
|
vals[name_val[0]] = name_val[1]
|
|
|
return vals
|
|
|
|
|
|
-def add_ap(ifname, params, wait_enabled=True, no_enable=False):
|
|
|
+def add_ap(ifname, params, wait_enabled=True, no_enable=False, timeout=30):
|
|
|
logger.info("Starting AP " + ifname)
|
|
|
hapd_global = HostapdGlobal()
|
|
|
hapd_global.remove(ifname)
|
|
@@ -303,7 +303,7 @@ def add_ap(ifname, params, wait_enabled=True, no_enable=False):
|
|
|
return hapd
|
|
|
hapd.enable()
|
|
|
if wait_enabled:
|
|
|
- ev = hapd.wait_event(["AP-ENABLED", "AP-DISABLED"], timeout=30)
|
|
|
+ ev = hapd.wait_event(["AP-ENABLED", "AP-DISABLED"], timeout=timeout)
|
|
|
if ev is None:
|
|
|
raise Exception("AP startup timed out")
|
|
|
if "AP-ENABLED" not in ev:
|