path: root/hostapd
diff options
authorSrinivasa Duvvuri <sduvvuri@google.com>2015-09-22 17:43:12 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-28 17:47:17 (GMT)
commit053693d2662cf64ffd621f8eed152d62dc53a9ef (patch)
treee4b7d9ae65ea8dcfe3175279e3d47950474b2793 /hostapd
parent9578413455158e7f90340a532e1654f152d02daa (diff)
hostapd: Add feature to start all interfaces at the same time in sync
When multiple interfaces across mutiple radios are started using a single instance of hostapd, they all come up at different times depending upon how long the ACS and HT scan take on each radio. This will result in stations (that already have the AP profile) associating with the first interfaces that comes up. For example in a dual band radio case (2G and 5G) with ACS enabled, 2G always comes up first because the ACS scan takes less time on 2G and this results in all stations associating with the 2G interface first. This feature brings up all the interfaces at the same time. The list of interfaces specified via hostapd.conf files on the command line are all marked as sync interfaces. All the interfaces are synchronized in hostapd_setup_interface_complete(). This feature is turned on with '-S' commmand line option. Signed-off-by: Srinivasa Duvvuri <sduvvuri@chromium.org>
Diffstat (limited to 'hostapd')
1 files changed, 8 insertions, 1 deletions
diff --git a/hostapd/main.c b/hostapd/main.c
index 6c7406a..72b1d91 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -456,6 +456,7 @@ static void usage(void)
" -T = record to Linux tracing in addition to logging\n"
" (records all messages regardless of debug verbosity)\n"
+ " -S start all the interfaces synchronously\n"
" -t include timestamps in some debug messages\n"
" -v show hostapd version\n");
@@ -570,6 +571,7 @@ int main(int argc, char *argv[])
int enable_trace_dbg = 0;
+ int start_ifaces_in_sync = 0;
if (os_program_init())
return -1;
@@ -587,7 +589,7 @@ int main(int argc, char *argv[])
interfaces.global_ctrl_dst = NULL;
for (;;) {
- c = getopt(argc, argv, "b:Bde:f:hKP:Ttu:vg:G:");
+ c = getopt(argc, argv, "b:Bde:f:hKP:STtu:vg:G:");
if (c < 0)
switch (c) {
@@ -644,6 +646,9 @@ int main(int argc, char *argv[])
bss_config = tmp_bss;
bss_config[num_bss_configs++] = optarg;
+ case 'S':
+ start_ifaces_in_sync = 1;
+ break;
case 'u':
return gen_uuid(optarg);
@@ -712,6 +717,8 @@ int main(int argc, char *argv[])
wpa_printf(MSG_ERROR, "Failed to initialize interface");
goto out;
+ if (start_ifaces_in_sync)
+ interfaces.iface[i]->need_to_start_in_sync = 1;
/* Allocate and parse configuration for per-BSS files */