aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-07-21 01:38:35 +0300
committerArik Nemtsov <arik@wizery.com>2012-08-02 13:04:02 +0300
commit37a9dc9e18d549f7f9508d7d870cf33b8d856c33 (patch)
tree7e822e718a34fe3617469d57030253f5e0f47dd9 /src/p2p
parent8b4bce98f1de19ad6427c9ca7b3be10638e606ff (diff)
downloadexternal_wpa_supplicant_8_ti-37a9dc9e18d549f7f9508d7d870cf33b8d856c33.zip
external_wpa_supplicant_8_ti-37a9dc9e18d549f7f9508d7d870cf33b8d856c33.tar.gz
external_wpa_supplicant_8_ti-37a9dc9e18d549f7f9508d7d870cf33b8d856c33.tar.bz2
P2P: Start blocked p2p find even if scan was on another interface (BRCM)
p2p find can now defer starting the p2p scan due to an ongoing scan on a different interface. Relying on p2p_cb_on_scan_complete which is a per interface flag is wrong here and we won't resume the p2p find in case the scan wasn't on the same interface (which is the case in Android JB). Fix this by relying on the global p2p state instead. (This description is based on analysis of the code as the original BRCM commit doesn't contain any useful information) Signed-off-by: Eyal Shapira <eyal@wizery.com>
Diffstat (limited to 'src/p2p')
-rw-r--r--src/p2p/p2p.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 5dc874f..a515949 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -1050,6 +1050,18 @@ int p2p_find(struct p2p_data *p2p, unsigned int timeout,
return res;
}
+#ifdef ANDROID_P2P
+int p2p_search_pending(struct p2p_data *p2p)
+{
+ if(p2p == NULL)
+ return 0;
+
+ if(p2p->state == P2P_SEARCH_WHEN_READY)
+ return 1;
+
+ return 0;
+}
+#endif
int p2p_other_scan_completed(struct p2p_data *p2p)
{