This is a part from this AOSP commit:
commit
98f9e76624da6bb96edc1982c423e4a119c5170a
Author: Dmitry Shmidt <dimitrysh@google.com>
Date: Wed May 30 11:18:46 2012 -0700
wpa_supplicant: Update to Version 0.8.27 from BRCM
- Fix crash during TRUE pbc overlap
- Fix p2p_stop_find event
- Avoid race condition in GO-NEG process if both peers enter
p2p_connect at the same time
- Retry assoc immediately on ASSOC-REJECT. Previously assoc was
retried on authentication timeout (which occurs after 10secs).
Now on assoc reject, we cancel the auth timer and then initiate
a assoc scan.
BUG:
6543705,
6427094
Change-Id: I4489fb14b6cead069f0d14fcbb9e2224f790d77b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
pbc = reg->pbc_sessions;
while (pbc) {
if (os_memcmp(pbc->uuid_e, uuid_e, WPS_UUID_LEN) == 0 ||
+#ifdef ANDROID_P2P
+ (p2p_dev_addr && !is_zero_ether_addr(pbc->addr) &&
+ os_memcmp(pbc->addr, p2p_dev_addr, ETH_ALEN) ==
+#else
(p2p_dev_addr && !is_zero_ether_addr(reg->p2p_dev_addr) &&
os_memcmp(reg->p2p_dev_addr, p2p_dev_addr, ETH_ALEN) ==
+#endif
0)) {
if (prev)
prev->next = pbc->next;