From patchwork Mon Oct 31 10:03:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ctrl_iface: Send an event when an inactive station is removed Date: Mon, 31 Oct 2011 00:03:34 -0000 From: Nicolas Cavallari X-Patchwork-Id: 122771 Message-Id: <1320055414-27754-1-git-send-email-cavallar@lri.fr> To: hostap@lists.shmoo.com Cc: Nicolas Cavallari Currently, there is no events over the control interface when a station is removed due to inactivity. With this patch, an "AP-STA-DISCONNECTED" event is sent when a station is removed. Signed-hostap: Nicolas Cavallari --- src/ap/sta_info.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index d82b9ce..28e6a32 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -17,6 +17,7 @@ #include "utils/common.h" #include "utils/eloop.h" #include "common/ieee802_11_defs.h" +#include "common/wpa_ctrl.h" #include "radius/radius.h" #include "radius/radius_client.h" #include "drivers/driver.h" @@ -375,6 +376,9 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx) mlme_deauthenticate_indication( hapd, sta, WLAN_REASON_PREV_AUTH_NOT_VALID); + + wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED MACSTR, + MAC2STR(sta->addr)); ap_free_sta(hapd, sta); break; }