From 5e1a4565f8e6c4add9ade52d53bb9af2ade6f1ee Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 6 Nov 2013 13:51:26 +0200 Subject: [PATCH] hostapd: Do not start secondary BSS unless interface is enabled It is possible for additional BSSs to be added while the primary interface is still in the process of determining channel parameters (HT co-ex scan, ACS, DFS). Do not enable secondary interfaces in such state immediately, but instead, wait for the pending operation on the primary interface to complete. Once that's done, the added extra BSSs will also be enabled in hostapd_setup_interface_complete(). Signed-hostap: Jouni Malinen --- src/ap/hostapd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 9306f50e5..60224ccbf 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -1768,7 +1768,8 @@ int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf) ETH_ALEN); if (start_ctrl_iface_bss(hapd) < 0 || - hostapd_setup_bss(hapd, -1)) { + (hapd_iface->state == HAPD_IFACE_ENABLED && + hostapd_setup_bss(hapd, -1))) { hapd_iface->conf->num_bss--; hapd_iface->num_bss--; wpa_printf(MSG_DEBUG, "%s: free hapd %p %s",