From 9fdd0fada7325bb631e05d93f46b95e107524fc5 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 18 Jul 2010 14:30:25 -0700 Subject: [PATCH] P2P: Add disassociation/deauthentication IE notifications --- wpa_supplicant/events.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 6d8daaf17..0fad8f7b3 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1547,8 +1547,18 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, break; } #endif /* CONFIG_AP */ - if (data) - reason_code = data->deauth_info.reason_code; + if (data) { + reason_code = data->disassoc_info.reason_code; + wpa_hexdump(MSG_DEBUG, "Disassociation frame IE(s)", + data->disassoc_info.ie, + data->disassoc_info.ie_len); +#ifdef CONFIG_P2P + wpas_p2p_disassoc_notif( + wpa_s, data->disassoc_info.addr, reason_code, + data->disassoc_info.ie, + data->disassoc_info.ie_len); +#endif /* CONFIG_P2P */ + } if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME) sme_event_disassoc(wpa_s, data); /* fall through */ @@ -1565,6 +1575,17 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, MAC2STR(data->deauth_info. addr)); } + wpa_hexdump(MSG_DEBUG, + "Deauthentication frame IE(s)", + data->deauth_info.ie, + data->deauth_info.ie_len); +#ifdef CONFIG_P2P + wpas_p2p_deauth_notif( + wpa_s, data->deauth_info.addr, + reason_code, + data->deauth_info.ie, + data->deauth_info.ie_len); +#endif /* CONFIG_P2P */ } } #ifdef CONFIG_AP