]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Add AP-ENABLED/DISABLED ctrl_iface events
authorJouni Malinen <j@w1.fi>
Sun, 3 Nov 2013 15:30:49 +0000 (17:30 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 3 Nov 2013 17:51:06 +0000 (19:51 +0200)
Signed-hostap: Jouni Malinen <j@w1.fi>

src/ap/hostapd.c
src/common/wpa_ctrl.h

index afad8efaab1056a252dec3c339aa3010bcd5037f..07dd6088f26c93da0a7c1269a05e4be2a771994d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * hostapd / Initialization and configuration
- * Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2002-2013, Jouni Malinen <j@w1.fi>
  *
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
@@ -11,6 +11,7 @@
 #include "utils/common.h"
 #include "utils/eloop.h"
 #include "common/ieee802_11_defs.h"
+#include "common/wpa_ctrl.h"
 #include "radius/radius_client.h"
 #include "radius/radius_das.h"
 #include "drivers/driver.h"
@@ -1156,6 +1157,7 @@ int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err)
        }
 
        hostapd_set_state(iface, HAPD_IFACE_ENABLED);
+       wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, AP_EVENT_ENABLED);
        if (hapd->setup_complete_cb)
                hapd->setup_complete_cb(hapd->setup_complete_cb_ctx);
 
@@ -1514,6 +1516,7 @@ int hostapd_disable_iface(struct hostapd_iface *hapd_iface)
 
        if (hapd_iface == NULL)
                return -1;
+       wpa_msg(hapd_iface->bss[0]->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
        driver = hapd_iface->bss[0]->driver;
        drv_priv = hapd_iface->bss[0]->drv_priv;
 
index 67b7226848269a5b057cdb54d0dbc43e5d84d922..40578ed4f5f0a9a22fd5e09ef8c4cef99727379d 100644 (file)
@@ -162,6 +162,9 @@ extern "C" {
 #define AP_REJECTED_MAX_STA "AP-REJECTED-MAX-STA "
 #define AP_REJECTED_BLOCKED_STA "AP-REJECTED-BLOCKED-STA "
 
+#define AP_EVENT_ENABLED "AP-ENABLED "
+#define AP_EVENT_DISABLED "AP-DISABLED "
+
 #define ACS_EVENT_STARTED "ACS-STARTED "
 #define ACS_EVENT_COMPLETED "ACS-COMPLETED "
 #define ACS_EVENT_FAILED "ACS-FAILED "