aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-08-15 09:10:19 +0300
committerArik Nemtsov <arik@wizery.com>2012-08-15 09:21:29 +0300
commit28d0719ff31de776031f73a13bfe804371588dbe (patch)
tree425cc07b1a2c994ee6040e27a9d49b8b7da2a7b9
parenta56f6df6f8e5dcd650893e8beb4a16a633c179d1 (diff)
downloadexternal_wpa_supplicant_8_ti-28d0719ff31de776031f73a13bfe804371588dbe.zip
external_wpa_supplicant_8_ti-28d0719ff31de776031f73a13bfe804371588dbe.tar.gz
external_wpa_supplicant_8_ti-28d0719ff31de776031f73a13bfe804371588dbe.tar.bz2
ctrl_iface: allow forcing go_intent during p2p_connect (ANDROID)
Allow the p2p_connect command to ignore android p2p concurrency considerations. Use the command line argument "no_p2p_conc" to p2p_connect in order to be able to set the go_intent. For instance: wpa_cli p2p_connect 00:11:22:33:44:55 pbc no_p2p_conc go_intent=3 Signed-off-by: Arik Nemtsov <arik@wizery.com>
-rw-r--r--wpa_supplicant/ctrl_iface.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 4c21833..7f81938 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -3050,6 +3050,9 @@ static int p2p_ctrl_connect(struct wpa_supplicant *wpa_s, char *cmd,
int go_intent = -1;
int freq = 0;
int pd;
+#ifdef ANDROID_P2P
+ int no_p2p_conc;
+#endif
/* <addr> <"pbc" | "pin" | PIN> [label|display|keypad]
* [persistent|persistent=<network id>]
@@ -3081,6 +3084,9 @@ static int p2p_ctrl_connect(struct wpa_supplicant *wpa_s, char *cmd,
auth = os_strstr(pos, " auth") != NULL;
automatic = os_strstr(pos, " auto") != NULL;
pd = os_strstr(pos, " provdisc") != NULL;
+#ifdef ANDROID_P2P
+ no_p2p_conc = os_strstr(pos, " no_p2p_conc") != NULL;
+#endif
pos2 = os_strstr(pos, " go_intent=");
if (pos2) {
@@ -3119,16 +3125,18 @@ static int p2p_ctrl_connect(struct wpa_supplicant *wpa_s, char *cmd,
}
#ifdef ANDROID_P2P
- if (p2p_handle_concurrency_conflicts(wpa_s, &go_intent) != 0) {
- wpa_printf(MSG_INFO, "P2P: Canceling p2p connect due to "
- "single channel concurrency conflicts.");
- return -1;
- }
+ if (!no_p2p_conc) {
+ if (p2p_handle_concurrency_conflicts(wpa_s, &go_intent) != 0) {
+ wpa_printf(MSG_INFO, "P2P: Canceling p2p connect due "
+ "to single channel concurrency conflicts.");
+ return -1;
+ }
- if (join && go_intent == 15) {
- wpa_printf(MSG_INFO, "P2P: Canceling p2p join due to "
- "single channel concurrency conflicts.");
- return -1;
+ if (join && go_intent == 15) {
+ wpa_printf(MSG_INFO, "P2P: Canceling p2p join due to "
+ "single channel concurrency conflicts.");
+ return -1;
+ }
}
#endif