From c66cf68d5cf537a36fb5a49d7af3e20945d8de96 Mon Sep 17 00:00:00 2001 From: Aarthi Thiruvengadam Date: Wed, 20 Jun 2012 21:38:31 +0300 Subject: [PATCH] P2P: Fix fallback to GO Negotiation to avoid PD-before-join timeout The wpas_p2p_pd_before_join_timeout could be left behind if the PD Request in p2p_connect-auto case does not succeed. This timeout can result in unexpected operations since it could trigger join operation while going through GO Negotiation. Fix this by canceling the timeout when falling back to GO Negotiation. Signed-hostap: Jouni Malinen --- wpa_supplicant/p2p_supplicant.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 199bed98d..ec13f0273 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4879,6 +4879,7 @@ static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s, int group_added) { struct wpa_supplicant *group = wpa_s; + eloop_cancel_timeout(wpas_p2p_pd_before_join_timeout, wpa_s, NULL); if (wpa_s->global->p2p_group_formation) group = wpa_s->global->p2p_group_formation; wpa_s = wpa_s->parent;