]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Set operstate UP when initializing AP mode
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 26 Oct 2010 13:30:28 +0000 (16:30 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 26 Oct 2010 13:30:28 +0000 (16:30 +0300)
This is needed to avoid problems with other applications setting and
leaving the interface to IF_OPER_DORMANT state. In AP mode, the interface
is ready immediately after the keys are set, so we better make sure the
DORMANT state does not prevent normal operations after that.

src/ap/hostapd.c

index cd9e87b88735d967d638a8dbc1860681989bacad..c5b678a8d9f5ef018ec6cd83211e6b69d1e7a2ea 100644 (file)
@@ -619,6 +619,9 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
 
        ieee802_11_set_beacon(hapd);
 
+       if (hapd->driver && hapd->driver->set_operstate)
+               hapd->driver->set_operstate(hapd->drv_priv, 1);
+
        return 0;
 }