From e7fc76b0f746ceec22a6a4a33d8a81561262484b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 1 Nov 2013 12:57:57 +0200 Subject: [PATCH] AOSP: Restore p2p_group_formation pointer on completion This is a part of the following AOSP commit: commit 4b86ea55603eded752b5773179884a35e74e1a89 Author: Dmitry Shmidt Date: Tue Sep 4 11:06:50 2012 -0700 wpa_supplicant: Update to BRCM version 0.8.0-38 - Restore p2p_group_formation pointer till the 4-way handshake completes for the p2p client Change-Id: I976659ae5dac4cf01ecdd7995ff9abb6bf914bc1 Signed-off-by: Dmitry Shmidt --- wpa_supplicant/p2p_supplicant.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 437427e92..5c4f0d0a8 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -773,6 +773,13 @@ static void wpas_group_formation_completed(struct wpa_supplicant *wpa_s, * packets. */ wpa_s->show_group_started = 1; +#ifdef ANDROID_P2P + /* For client Second phase of Group formation (4-way handshake) can be still pending + * So we need to restore wpa_s->global->p2p_group_formation */ + wpa_printf(MSG_INFO, "Restoring back wpa_s->global->p2p_group_formation to wpa_s %p\n", wpa_s); + wpa_s->global->p2p_group_formation = wpa_s; +#endif + } else if (ssid && ssid->passphrase == NULL && ssid->psk_set) { char psk[65]; wpa_snprintf_hex(psk, sizeof(psk), ssid->psk, 32); -- 2.47.2