From: Jouni Malinen Date: Fri, 1 Nov 2013 10:20:31 +0000 (+0200) Subject: AOSP: Unused p2p_search_in_progress() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b08bb12beb2a49055bc498e0a1e2c7212e3c2662;p=thirdparty%2Fhostap.git AOSP: Unused p2p_search_in_progress() This came as part of the following AOSP commit, but the function is not used anywhere. This should be reverted. commit 1f69aa52ea2e0a73ac502565df8c666ee49cab6a Author: Dmitry Shmidt Date: Tue Jan 24 16:10:04 2012 -0800 Update to new version 0.8.16 from BRCM Sync with main tree commit b8349523e460493fa0b4de36c689595109e45e91 Author: Neeraj Kumar Garg Date: Tue Dec 27 23:21:45 2011 +0200 P2P: Reject p2p_group_add if forced frequency is not acceptable Change-Id: Icb4541a371b05c270e80440d7a7fdea7f33ff61e Signed-off-by: Dmitry Shmidt --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 51205b884..6b41a097d 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -4152,6 +4152,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 9b6921e55..93429337f 100644 --- a/src/p2p/p2p.h +++ b/src/p2p/p2p.h @@ -1771,6 +1771,14 @@ 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_other_scan_completed - Notify completion of non-P2P scan * @p2p: P2P module context from p2p_init()