nl80211: Handle NL80211_CMD_PROBE_CLIENT command response
When processing the NL80211_CMD_PROBE_CLIENT command response, the nl80211 layer in the kernel sends a response containing the cookie associated with the client probe request. This response was not handled by driver_nl80211.c when sending the command, and it was mistakenly handled as an asynchronous event. This incorrect event did not include the MAC/ACK attributes, so it was ignored in practice, but nevertheless, the command response should not be processed as an event. Fix this by reading the response as part of the sending the command flow. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
5e6c54bee8
commit
323a51cc01
1 changed files with 7 additions and 1 deletions
|
@ -8286,6 +8286,7 @@ static void nl80211_poll_client(void *priv, const u8 *own_addr, const u8 *addr,
|
|||
struct i802_bss *bss = priv;
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
struct nl_msg *msg;
|
||||
u64 cookie;
|
||||
int ret;
|
||||
|
||||
if (!drv->poll_command_supported) {
|
||||
|
@ -8299,11 +8300,16 @@ static void nl80211_poll_client(void *priv, const u8 *own_addr, const u8 *addr,
|
|||
return;
|
||||
}
|
||||
|
||||
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
|
||||
ret = send_and_recv_msgs(drv, msg, cookie_handler, &cookie);
|
||||
if (ret < 0) {
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Client probe request for "
|
||||
MACSTR " failed: ret=%d (%s)",
|
||||
MAC2STR(addr), ret, strerror(-ret));
|
||||
} else {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: Client probe request addr=" MACSTR
|
||||
" cookie=%llu", MAC2STR(addr),
|
||||
(long long unsigned int) cookie);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue