diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2012-09-04 11:06:50 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2012-09-04 17:23:06 -0700 |
commit | 4b86ea55603eded752b5773179884a35e74e1a89 (patch) | |
tree | f318567dd2fa6b0257985ff2e3e9af290b732b9e | |
parent | 286cca548b36080e8bddef5dd4a8e4b17e78881c (diff) | |
download | external_wpa_supplicant_8-4b86ea55603eded752b5773179884a35e74e1a89.zip external_wpa_supplicant_8-4b86ea55603eded752b5773179884a35e74e1a89.tar.gz external_wpa_supplicant_8-4b86ea55603eded752b5773179884a35e74e1a89.tar.bz2 |
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>
-rw-r--r-- | wpa_supplicant/p2p_supplicant.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 3dc633c..55cb243 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -621,6 +621,12 @@ 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_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); @@ -4881,9 +4887,28 @@ int wpas_p2p_disconnect(struct wpa_supplicant *wpa_s) int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s) { +#ifdef ANDROID_P2P + struct wpa_supplicant *group = wpa_s; +#endif + if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL) return 0; +#ifdef ANDROID_P2P + while (group && (group->p2p_group_interface != NOT_P2P_GROUP_INTERFACE)) { + if(group->wpa_state == WPA_ASSOCIATED) { + /* WPA_ASSOCIATED hasn't moved to WPA_COMPLETED. So it could be in WPS + * or 4Way Hanshake phase. Avoid allowing scan during this time critical + * phase + */ + wpa_printf(MSG_ERROR, "P2P: WPS/4way handshake in Progress." + " Defer SCAN "); + return 1; + } + group = group->next; + } +#endif + return p2p_in_progress(wpa_s->global->p2p); } |