[PATCH RFC] AP: Allow using existing interfaces for all BSS-es

Rafał Miłecki zajec5 at gmail.com
Sun May 29 23:53:13 PDT 2016

Some drivers (e.g. brcmfmac) may not support deleting virtual
interfaces. In such cases we can start AP interfaces once only. This can
be easily workarounded by allowing driver(s) to use all existing

Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>

This patch allows me freely use BCM4366 with brcmfmac and multiple AP
interfaces. Unfortunately I don't know reason for having this limiration
in the first place. Do you know if my patch may break anything?
 src/ap/hostapd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 42c1aaa..1974b2f 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -941,7 +941,7 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
 				   conf->iface, addr, hapd,
 				   &hapd->drv_priv, force_ifname, if_addr,
 				   conf->bridge[0] ? conf->bridge : NULL,
-				   first == -1)) {
+				   true)) {
 			wpa_printf(MSG_ERROR, "Failed to add BSS (BSSID="
 				   MACSTR ")", MAC2STR(hapd->own_addr));
 			hapd->interface_added = 0;

More information about the Hostap mailing list