diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 1a7f2f79c..3ad8812e5 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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); diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 40e1200e2..2ca55d855 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -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) {