This needs to be done both in the more normal location in
p2p_timeout_connect_listen() (internal timeout after driver event) and
in p2p_listen_end() as a workaround for the case where the driver event
is delayed to happen after the internal timeout.
return 0; /* Internal timeout will trigger the next step */
if (p2p->state == P2P_CONNECT_LISTEN && p2p->go_neg_peer) {
+ if (p2p->go_neg_peer->connect_reqs >= 120) {
+ wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
+ "P2P: Timeout on sending GO Negotiation "
+ "Request without getting response");
+ p2p_go_neg_failed(p2p, p2p->go_neg_peer, -1);
+ return 0;
+ }
+
p2p_set_state(p2p, P2P_CONNECT);
p2p_connect_send(p2p, p2p->go_neg_peer);
return 1;