aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-10-26 08:52:54 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-26 08:52:54 (GMT)
commitab93fdebf138ef5bebcdbca2cc665f3ece131e64 (patch)
tree1e5ba6ca8441e5ca597465217c8036be44db34e7 /src
parentac69c332974e69690abbcd9ae54d59635434b55c (diff)
downloadhostap-ab93fdebf138ef5bebcdbca2cc665f3ece131e64.zip
hostap-ab93fdebf138ef5bebcdbca2cc665f3ece131e64.tar.gz
hostap-ab93fdebf138ef5bebcdbca2cc665f3ece131e64.tar.bz2
hostapd: Add INTERFACE-ENABLED and INTERFACE-DISABLED events
These can be convenient for upper layer programs to determine if the hostapd interface gets disabled/re-enabled, e.g., due to rfkill block/unblock. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/ap/drv_callbacks.c6
-rw-r--r--src/common/wpa_ctrl.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index bcecac1..ea4e09a 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -1168,6 +1168,12 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
hapd->iface, data->channel_list_changed.initiator);
break;
#endif /* NEED_AP_MLME */
+ case EVENT_INTERFACE_ENABLED:
+ wpa_msg(hapd->msg_ctx, MSG_INFO, INTERFACE_ENABLED);
+ break;
+ case EVENT_INTERFACE_DISABLED:
+ wpa_msg(hapd->msg_ctx, MSG_INFO, INTERFACE_DISABLED);
+ break;
default:
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
break;
diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index 9c6188c..8614a27 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -208,6 +208,9 @@ extern "C" {
#define AP_EVENT_ENABLED "AP-ENABLED "
#define AP_EVENT_DISABLED "AP-DISABLED "
+#define INTERFACE_ENABLED "INTERFACE-ENABLED "
+#define INTERFACE_DISABLED "INTERFACE-DISABLED "
+
#define ACS_EVENT_STARTED "ACS-STARTED "
#define ACS_EVENT_COMPLETED "ACS-COMPLETED "
#define ACS_EVENT_FAILED "ACS-FAILED "