aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/p2p/p2p.c8
-rw-r--r--src/p2p/p2p.h10
-rw-r--r--wpa_supplicant/p2p_supplicant.c7
-rw-r--r--wpa_supplicant/p2p_supplicant.h1
-rw-r--r--wpa_supplicant/scan.c2
5 files changed, 1 insertions, 27 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index e905e77..824a59e 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -4102,14 +4102,6 @@ int p2p_in_progress(struct p2p_data *p2p)
return p2p->state != P2P_IDLE && p2p->state != P2P_PROVISIONING;
}
-int p2p_non_idle(struct p2p_data *p2p)
-{
- if (p2p == NULL)
- return 0;
- return p2p->state != P2P_IDLE;
-}
-
-
void p2p_set_config_timeout(struct p2p_data *p2p, u8 go_timeout,
u8 client_timeout)
{
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index 3f796d0..3c439f3 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -1690,16 +1690,6 @@ int p2p_set_pref_chan(struct p2p_data *p2p, unsigned int num_pref_chan,
*/
int p2p_in_progress(struct p2p_data *p2p);
-/**
- * p2p_non_idle - Check whether P2P is not in P2P_IDLE. That
- * means we're in either search, GO neg or provisioing. Once connected
- * it's back to idle. p2p_in_progress excludes provisioing.
- * @p2p: P2P module context from p2p_init()
- * Returns: 0 if P2P module is idle or 1 if an operation is in progress
- */
-int p2p_non_idle(struct p2p_data *p2p);
-
-
#ifdef ANDROID_P2P
/**
* p2p_search_in_progress - Check whether a P2P SEARCH is in progress
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index b0eb594..ae23632 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -4973,13 +4973,6 @@ int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s)
return p2p_in_progress(wpa_s->global->p2p);
}
-int wpas_p2p_non_idle(struct wpa_supplicant *wpa_s)
-{
- if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
- return 0;
-
- return p2p_non_idle(wpa_s->global->p2p);
-}
void wpas_p2p_network_removed(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid)
diff --git a/wpa_supplicant/p2p_supplicant.h b/wpa_supplicant/p2p_supplicant.h
index f24fb28..8d3bff1 100644
--- a/wpa_supplicant/p2p_supplicant.h
+++ b/wpa_supplicant/p2p_supplicant.h
@@ -137,7 +137,6 @@ int wpas_p2p_disconnect(struct wpa_supplicant *wpa_s);
void wpas_p2p_wps_failed(struct wpa_supplicant *wpa_s,
struct wps_event_fail *fail);
int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s);
-int wpas_p2p_non_idle(struct wpa_supplicant *wpa_s);
void wpas_p2p_network_removed(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid);
struct wpa_ssid * wpas_p2p_get_persistent(struct wpa_supplicant *wpa_s,
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 6b43968..2b468fb 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -66,7 +66,7 @@ static int wpas_wps_in_use(struct wpa_supplicant *wpa_s,
}
#ifdef CONFIG_P2P
- if (wpas_p2p_non_idle(wpa_s)) {
+ if (!wpa_s->global->p2p_disabled && wpa_s->global->p2p) {
wpa_s->wps->dev.p2p = 1;
if (!wps) {
wps = 1;