aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira2012-10-28 13:29:14 -0500
committerEyal Shapira2012-10-29 04:14:08 -0500
commite62ecda1b94b2b07dfce877654b10c6ff8c46857 (patch)
tree5cf28eeffeed93d013c6e654be7e4d8e568bb37a
parent25dec55e99994c197167d5db10d0efc0b04e707d (diff)
downloadhostap-e62ecda1b94b2b07dfce877654b10c6ff8c46857.tar.gz
hostap-e62ecda1b94b2b07dfce877654b10c6ff8c46857.tar.xz
hostap-e62ecda1b94b2b07dfce877654b10c6ff8c46857.zip
Revert "Add P2P IEs to probe requests only when in P2P (UPSTREAM)"
This is replaced by a recent patch by Jouni in the upstream: "P2P: Allow P2P functionality to be disabled per interface" This reverts commit a56f6df6f8e5dcd650893e8beb4a16a633c179d1. Conflicts: src/p2p/p2p.c
-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 e905e772..824a59ed 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -4102,14 +4102,6 @@ int p2p_in_progress(struct p2p_data *p2p)
4102 return p2p->state != P2P_IDLE && p2p->state != P2P_PROVISIONING; 4102 return p2p->state != P2P_IDLE && p2p->state != P2P_PROVISIONING;
4103} 4103}
4104 4104
4105int p2p_non_idle(struct p2p_data *p2p)
4106{
4107 if (p2p == NULL)
4108 return 0;
4109 return p2p->state != P2P_IDLE;
4110}
4111
4112
4113void p2p_set_config_timeout(struct p2p_data *p2p, u8 go_timeout, 4105void p2p_set_config_timeout(struct p2p_data *p2p, u8 go_timeout,
4114 u8 client_timeout) 4106 u8 client_timeout)
4115{ 4107{
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index 3f796d02..3c439f39 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,
1690 */ 1690 */
1691int p2p_in_progress(struct p2p_data *p2p); 1691int p2p_in_progress(struct p2p_data *p2p);
1692 1692
1693/**
1694 * p2p_non_idle - Check whether P2P is not in P2P_IDLE. That
1695 * means we're in either search, GO neg or provisioing. Once connected
1696 * it's back to idle. p2p_in_progress excludes provisioing.
1697 * @p2p: P2P module context from p2p_init()
1698 * Returns: 0 if P2P module is idle or 1 if an operation is in progress
1699 */
1700int p2p_non_idle(struct p2p_data *p2p);
1701
1702
1703#ifdef ANDROID_P2P 1693#ifdef ANDROID_P2P
1704/** 1694/**
1705 * p2p_search_in_progress - Check whether a P2P SEARCH is in progress 1695 * 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 b0eb594e..ae236326 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)
4973 return p2p_in_progress(wpa_s->global->p2p); 4973 return p2p_in_progress(wpa_s->global->p2p);
4974} 4974}
4975 4975
4976int wpas_p2p_non_idle(struct wpa_supplicant *wpa_s)
4977{
4978 if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
4979 return 0;
4980
4981 return p2p_non_idle(wpa_s->global->p2p);
4982}
4983 4976
4984void wpas_p2p_network_removed(struct wpa_supplicant *wpa_s, 4977void wpas_p2p_network_removed(struct wpa_supplicant *wpa_s,
4985 struct wpa_ssid *ssid) 4978 struct wpa_ssid *ssid)
diff --git a/wpa_supplicant/p2p_supplicant.h b/wpa_supplicant/p2p_supplicant.h
index f24fb283..8d3bff1f 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);
137void wpas_p2p_wps_failed(struct wpa_supplicant *wpa_s, 137void wpas_p2p_wps_failed(struct wpa_supplicant *wpa_s,
138 struct wps_event_fail *fail); 138 struct wps_event_fail *fail);
139int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s); 139int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s);
140int wpas_p2p_non_idle(struct wpa_supplicant *wpa_s);
141void wpas_p2p_network_removed(struct wpa_supplicant *wpa_s, 140void wpas_p2p_network_removed(struct wpa_supplicant *wpa_s,
142 struct wpa_ssid *ssid); 141 struct wpa_ssid *ssid);
143struct wpa_ssid * wpas_p2p_get_persistent(struct wpa_supplicant *wpa_s, 142struct wpa_ssid * wpas_p2p_get_persistent(struct wpa_supplicant *wpa_s,
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 6b43968c..2b468fbe 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,
66 } 66 }
67 67
68#ifdef CONFIG_P2P 68#ifdef CONFIG_P2P
69 if (wpas_p2p_non_idle(wpa_s)) { 69 if (!wpa_s->global->p2p_disabled && wpa_s->global->p2p) {
70 wpa_s->wps->dev.p2p = 1; 70 wpa_s->wps->dev.p2p = 1;
71 if (!wps) { 71 if (!wps) {
72 wps = 1; 72 wps = 1;