Browse Source

hostapd: Set operstate UP when initializing AP mode

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.
Jouni Malinen 14 years ago
parent
commit
e11f5a2cbc
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/ap/hostapd.c

+ 3 - 0
src/ap/hostapd.c

@@ -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;
 }