From 13256b8cf3ed3965207e7dcc83435b2a13114a0a Mon Sep 17 00:00:00 2001 From: Hu Wang Date: Wed, 29 Jul 2020 11:15:35 +0800 Subject: [PATCH] P2P: Stop old listen radio work before go to WAIT_PEER_IDLE state 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 --- src/p2p/p2p.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index b7a5eae35..f9ca90301 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -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); }