Add more debug info on deauth/disassoc events and commands

This commit is contained in:
Jouni Malinen 2010-08-17 21:04:38 +03:00
parent 43dd46b3bc
commit 2e75a2b3a6
2 changed files with 21 additions and 3 deletions

View file

@ -2412,7 +2412,8 @@ nla_put_failure:
static int wpa_driver_nl80211_disconnect(struct wpa_driver_nl80211_data *drv,
const u8 *addr, int reason_code)
{
wpa_printf(MSG_DEBUG, "%s", __func__);
wpa_printf(MSG_DEBUG, "%s(addr=" MACSTR " reason_code=%d)",
__func__, MAC2STR(addr), reason_code);
drv->associated = 0;
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DISCONNECT,
reason_code, 0);
@ -2426,7 +2427,8 @@ static int wpa_driver_nl80211_deauthenticate(void *priv, const u8 *addr,
struct wpa_driver_nl80211_data *drv = bss->drv;
if (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME))
return wpa_driver_nl80211_disconnect(drv, addr, reason_code);
wpa_printf(MSG_DEBUG, "%s", __func__);
wpa_printf(MSG_DEBUG, "%s(addr=" MACSTR " reason_code=%d)",
__func__, MAC2STR(addr), reason_code);
drv->associated = 0;
return wpa_driver_nl80211_mlme(drv, addr, NL80211_CMD_DEAUTHENTICATE,
reason_code, 0);

View file

@ -1604,6 +1604,13 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
break;
case EVENT_DISASSOC:
wpa_printf(MSG_DEBUG, "Disassociation notification");
if (data) {
wpa_printf(MSG_DEBUG, " * reason %u",
data->disassoc_info.reason_code);
if (data->disassoc_info.addr)
wpa_printf(MSG_DEBUG, " * address " MACSTR,
MAC2STR(data->disassoc_info.addr));
}
#ifdef CONFIG_AP
if (wpa_s->ap_iface && data) {
hostapd_notif_disassoc(wpa_s->ap_iface->bss[0],
@ -1619,8 +1626,17 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
case EVENT_DEAUTH:
if (event == EVENT_DEAUTH) {
wpa_printf(MSG_DEBUG, "Deauthentication notification");
if (data)
if (data) {
reason_code = data->deauth_info.reason_code;
wpa_printf(MSG_DEBUG, " * reason %u",
data->deauth_info.reason_code);
if (data->deauth_info.addr) {
wpa_printf(MSG_DEBUG, " * address "
MACSTR,
MAC2STR(data->deauth_info.
addr));
}
}
}
#ifdef CONFIG_AP
if (wpa_s->ap_iface && data) {