]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Skip Extended Listen timeout to allow scans during group formation
authorShivani Baranwal <quic_shivbara@quicinc.com>
Thu, 20 Oct 2022 12:46:28 +0000 (18:16 +0530)
committerJouni Malinen <j@w1.fi>
Sat, 5 Nov 2022 10:17:21 +0000 (12:17 +0200)
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 <quic_shivbara@quicinc.com>
wpa_supplicant/p2p_supplicant.c

index be61598522da579108357273d24a3968c3992381..7ca0275be09744ae7ebf4da543e191182d4e8c8c 100644 (file)
@@ -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;
                }
        }