aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-07-21 02:27:50 +0300
committerArik Nemtsov <arik@wizery.com>2012-08-02 13:04:02 +0300
commitb391fd8179087f815461617717c06e4164608157 (patch)
treea18530f1df7befdd4bbc1d671696899952d6c89a /src
parent37a9dc9e18d549f7f9508d7d870cf33b8d856c33 (diff)
downloadexternal_wpa_supplicant_8_ti-b391fd8179087f815461617717c06e4164608157.zip
external_wpa_supplicant_8_ti-b391fd8179087f815461617717c06e4164608157.tar.gz
external_wpa_supplicant_8_ti-b391fd8179087f815461617717c06e4164608157.tar.bz2
P2P: Improve scan results handling (BRCM)
Avoid reporting scan results to the application in case a P2P search is in progress as there will be many events but the scan is only done on channels 1,6,11. This may cause APs on other channels to "disappear" from the scan results. Also avoid updating P2P interfaces with STA interfaces scan results in order to avoid having results which are not on the social channels. Signed-off-by: Eyal Shapira <eyal@wizery.com>
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p.c9
-rw-r--r--src/p2p/p2p.h16
2 files changed, 25 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index a515949..7f34be4 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -4049,6 +4049,15 @@ p2p_get_peer_found(struct p2p_data *p2p, const u8 *addr, int next)
return &dev->info;
}
+#ifdef ANDROID_P2P
+int p2p_search_in_progress(struct p2p_data *p2p)
+{
+ if (p2p == NULL)
+ return 0;
+
+ return p2p->state == P2P_SEARCH;
+}
+#endif
int p2p_in_progress(struct p2p_data *p2p)
{
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index 91c0426..9be5b84 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -1688,6 +1688,22 @@ int p2p_set_pref_chan(struct p2p_data *p2p, unsigned int num_pref_chan,
*/
int p2p_in_progress(struct p2p_data *p2p);
+#ifdef ANDROID_P2P
+/**
+ * p2p_search_in_progress - Check whether a P2P SEARCH is in progress
+ * @p2p: P2P module context from p2p_init()
+ * Returns: 0 if P2P module is idle or 1 if an operation is in progress
+ */
+int p2p_search_in_progress(struct p2p_data *p2p);
+
+/**
+ * p2p_search_pending - Check whether there is a deferred P2P SEARCH
+ * @p2p: P2P module context from p2p_init()
+ * Returns: 0 if there is no deferred P2P search or 1 if there is one
+ */
+int p2p_search_pending(struct p2p_data *p2p);
+#endif
+
/**
* p2p_other_scan_completed - Notify completion of non-P2P scan
* @p2p: P2P module context from p2p_init()