From 368de263bc94d67678cf9e742c2488398a3c6332 Mon Sep 17 00:00:00 2001 From: Shivani Baranwal Date: Thu, 20 Oct 2022 18:16:28 +0530 Subject: [PATCH] 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 --- wpa_supplicant/p2p_supplicant.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } } -- 2.47.2