[PATCH 1/1] Fix GO failed interface init

Eduardo Abinader eduardo.abinader at openbossa.org
Thu Mar 20 08:43:31 EDT 2014


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 <eduardo.abinader at openbossa.org>
---
 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 487d44d..2329ff9 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);
+			eloop_cancel_timeout(wpas_p2p_group_formation_timeout, wpa_s, NULL);
+			wpas_p2p_group_formation_failed(wpa_s);
 			return;
 		}
 		if (group_wpa_s != wpa_s) {
-- 
1.8.3.2



More information about the HostAP mailing list