nl80211: More detailed PROBE_CLIENT debug print
Include the MAC address of the peer, knowledge of whether the poll was ACKed, and cookie into the debug message to make this more useful. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9c4554a9b7
commit
28f19a3ae5
1 changed files with 13 additions and 6 deletions
|
@ -1438,16 +1438,23 @@ static void nl80211_client_probe_event(struct wpa_driver_nl80211_data *drv,
|
|||
struct nlattr **tb)
|
||||
{
|
||||
union wpa_event_data data;
|
||||
const u8 *addr;
|
||||
u64 cookie = 0;
|
||||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Probe client event");
|
||||
|
||||
if (!tb[NL80211_ATTR_MAC] || !tb[NL80211_ATTR_ACK])
|
||||
addr = nla_data(tb[NL80211_ATTR_MAC]);
|
||||
if (!addr)
|
||||
return;
|
||||
if (tb[NL80211_ATTR_COOKIE])
|
||||
cookie = nla_get_u64(tb[NL80211_ATTR_COOKIE]);
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Probe client event (addr=" MACSTR
|
||||
" ack=%d cookie=%llu)", MAC2STR(addr),
|
||||
tb[NL80211_ATTR_ACK] != NULL,
|
||||
(long long unsigned int) cookie);
|
||||
if (!tb[NL80211_ATTR_ACK])
|
||||
return;
|
||||
|
||||
os_memset(&data, 0, sizeof(data));
|
||||
os_memcpy(data.client_poll.addr,
|
||||
nla_data(tb[NL80211_ATTR_MAC]), ETH_ALEN);
|
||||
|
||||
os_memcpy(data.client_poll.addr, addr, ETH_ALEN);
|
||||
wpa_supplicant_event(drv->ctx, EVENT_DRIVER_CLIENT_POLL_OK, &data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue