]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Stop old listen radio work before go to WAIT_PEER_IDLE state
authorHu Wang <huw@codeaurora.org>
Wed, 29 Jul 2020 03:15:35 +0000 (11:15 +0800)
committerJouni Malinen <j@w1.fi>
Wed, 14 Oct 2020 20:16:16 +0000 (23:16 +0300)
P2P goes to Listen state while waiting for the peer to become ready for
GO Negotiation. If old listen radio work has not been completed, P2P
fails to go to listen state. This could happen in cases where P2P Action
frame transmission reused ongoing p2p-listen radio work.

p2p0: Add radio work 'p2p-listen'@0x
P2P-FIND-STOPPED
p2p0: Starting radio work 'p2p-listen'@0x after 0.010644 second wait
P2P: Use ongoing radio work for Action frame TX
P2P: Use ongoing radio work for Action frame TX
P2P: State CONNECT -> CONNECT
P2P: State CONNECT -> WAIT_PEER_IDLE
P2P: State WAIT_PEER_IDLE -> WAIT_PEER_CONNECT
P2P: Reject start_listen since p2p_listen_work already exists
P2P: Failed to start listen mode

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/p2p/p2p.c

index b7a5eae3540e33f148e7dcd4a2a2f380765ac20a..f9ca90301eb5b590606e30a4c15ed4b025621dba 100644 (file)
@@ -3974,6 +3974,7 @@ static void p2p_timeout_wait_peer_idle(struct p2p_data *p2p)
        }
 
        p2p_dbg(p2p, "Go to Listen state while waiting for the peer to become ready for GO Negotiation");
+       p2p->cfg->stop_listen(p2p->cfg->cb_ctx);
        p2p_set_state(p2p, P2P_WAIT_PEER_CONNECT);
        p2p_listen_in_find(p2p, 0);
 }