]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AOSP: Restore p2p_group_formation pointer on completion
authorJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 10:57:57 +0000 (12:57 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Nov 2013 14:36:32 +0000 (16:36 +0200)
This is a part of the following AOSP commit:

commit 4b86ea55603eded752b5773179884a35e74e1a89
Author: Dmitry Shmidt <dimitrysh@google.com>
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 <dimitrysh@google.com>
wpa_supplicant/p2p_supplicant.c

index 437427e92638441e2a017f7c610dc3d9d934aacf..5c4f0d0a8f1ea97fbd46fbf23bd6667c0d6be888 100644 (file)
@@ -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);