From: Felix Fietkau Date: Wed, 11 Nov 2009 14:47:01 +0000 (+0200) Subject: hostapd: fix AP mode initialization for nl80211 X-Git-Tag: hostap_0_7_0~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6980c1912782a7eb85e2758a16d235b522ef4428;p=thirdparty%2Fhostap.git hostapd: fix AP mode initialization for nl80211 Always bring down the wlan interface, even when not changing the BSSID, the interface also needs to be down for changing its type from managed to AP mode. --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index d11141dc1..97348ef29 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -4418,10 +4418,10 @@ static void *i802_init(struct hostapd_data *hapd, /* start listening for EAPOL on the default AP interface */ add_ifidx(drv, drv->ifindex); - if (params->bssid) { - if (hostapd_set_iface_flags(drv, drv->ifname, 0)) - goto failed; + if (hostapd_set_iface_flags(drv, drv->ifname, 0)) + goto failed; + if (params->bssid) { if (set_ifhwaddr(drv, drv->ifname, params->bssid)) goto failed; }