From 5eae87a7d61b053fb315c667f97954d004c195a5 Mon Sep 17 00:00:00 2001 From: Eduardo Abinader Date: Thu, 20 Mar 2014 08:43:31 -0400 Subject: [PATCH] P2P: Fix GO failed interface init Whenever an ongoing GO Neg has failed, due to interface init, the P2P Device should cancel timeouts and issue wpas_p2p_group_formation_failed, so the other peer detects faster group formation has failed. Signed-off-by: Eduardo Abinader --- wpa_supplicant/p2p_supplicant.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 487d44d41..6f9f2176b 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1622,6 +1622,9 @@ static void wpas_go_neg_completed(void *ctx, struct p2p_go_neg_results *res) wpas_p2p_init_group_interface(wpa_s, res->role_go); if (group_wpa_s == NULL) { wpas_p2p_remove_pending_group_interface(wpa_s); + eloop_cancel_timeout(wpas_p2p_long_listen_timeout, + wpa_s, NULL); + wpas_p2p_group_formation_failed(wpa_s); return; } if (group_wpa_s != wpa_s) {