From: Shivani Baranwal Date: Thu, 20 Oct 2022 12:46:28 +0000 (+0530) Subject: P2P: Skip Extended Listen timeout to allow scans during group formation X-Git-Tag: hostap_2_11~1577 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=368de263bc94d67678cf9e742c2488398a3c6332;p=thirdparty%2Fhostap.git P2P: Skip Extended Listen timeout to allow scans during group formation Scans are allowed on the current interface for group formation only when in the P2P_SEARCH, P2P_IDLE, or P2P_PROVISIONING state. But Extended Listen timeout being enabled moves to the P2P_LISTEN_ONLY state. Due to this P2P connection fails if the GO is not found with scans triggerred before Extended Listen timeout. To avoid this skip Extended Listen timeout to allow scans during group formation on the current interface. Signed-off-by: Shivani Baranwal --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index be6159852..7ca0275be 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -8507,6 +8507,10 @@ int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s) "in group formation", wpa_s->global->p2p_group_formation->ifname); ret = 1; + } else if (wpa_s->global->p2p_group_formation == wpa_s) { + wpa_dbg(wpa_s, MSG_DEBUG, + "P2P: Skip Extended Listen timeout and allow scans on current interface for group formation"); + ret = 2; } }