diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/p2p/p2p.c | 9 | ||||
-rw-r--r-- | src/p2p/p2p.h | 16 |
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() |