diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2012-02-27 17:23:41 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-02-27 17:23:41 +0200 |
commit | 1a9c618d3f465b974a724dc2cb3e4030837e2982 (patch) | |
tree | 811f90704d99c49f0040b347758bb05ad8dc365a /src/p2p/p2p.c | |
parent | e62f4ed0df72987f874b9bc5c9fa8bec938133ac (diff) | |
download | external_wpa_supplicant_8_ti-1a9c618d3f465b974a724dc2cb3e4030837e2982.zip external_wpa_supplicant_8_ti-1a9c618d3f465b974a724dc2cb3e4030837e2982.tar.gz external_wpa_supplicant_8_ti-1a9c618d3f465b974a724dc2cb3e4030837e2982.tar.bz2 |
P2P: Fix remain-on-channel use with PD/Invitation Request while in Listen
If Listen state was in progress on another channel when a request to
send an Action frame (e.g., Provision Discovery Request or Invitation
Request to a peer on the peer's Listen channel that is different from
our Listenc hannel) is issued, wpa_supplicant tried to use concurrent
remain-on-channel operations. While some drivers can handle this
cleanly, there are drivers that don't and wpa_supplicant is not expected
to request concurrent remain-on-channel operations.
Fix this by cancelling the ongoing remain-on-channel with stop_listen
prior to sending the Action frame on another channel. If a P2P search
was in progress, it will be continued after the timeout on the new
operation.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/p2p/p2p.c')
-rw-r--r-- | src/p2p/p2p.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 2b003ae..b196e6f 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -1024,11 +1024,21 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq) p2p->go_neg_peer = NULL; p2p->sd_peer = NULL; p2p->invite_peer = NULL; + p2p_stop_listen_for_freq(p2p, freq); +} + + +void p2p_stop_listen_for_freq(struct p2p_data *p2p, int freq) +{ if (freq > 0 && p2p->drv_in_listen == freq && p2p->in_listen) { wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Skip stop_listen " "since we are on correct channel for response"); return; } + if (p2p->in_listen) { + p2p->in_listen = 0; + p2p_clear_timeout(p2p); + } if (p2p->drv_in_listen) { /* * The driver may not deliver callback to p2p_listen_end() |