diff mbox

[1/2] P2P: Add missing direct global ctrl_iface commands for P2P

Message ID 20140115183351.1625C1401FA@ushik.mtv.corp.google.com
State Accepted
Headers show

Commit Message

Dmitry Shmidt Jan. 15, 2014, 6:27 p.m. UTC
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
 wpa_supplicant/ctrl_iface.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Jouni Malinen Jan. 17, 2014, 10:37 a.m. UTC | #1
On Wed, Jan 15, 2014 at 10:27:19AM -0800, Dmitry Shmidt wrote:
> diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
> @@ -6345,6 +6345,8 @@ static char * wpas_global_ctrl_iface_redir_p2p(struct wpa_global *global,
>  #ifdef CONFIG_P2P
>  	static const char * cmd[] = {
> +		"LIST_NETWORKS",
> +		"SAVE_CONFIG",

>  	static const char * prefix[] = {
> +#ifdef ANDROID
> +		"DRIVER ",
> +#endif
> +		"GET_NETWORK ",
> +		"REMOVE_NETWORK ",
> +		"SET ",

Thanks, applied. Though, I want to make sure it is understood that these
commands are not explicitly for P2P uses and they may even be used for
per-interface operations. Doing such operations through the global
control interface without the IFNAME= prefix has undefined behavior and
that behavior may change. As such, I would not recommend using these for
anything else than operations that are clearly in global context (e.g.,
for P2P management purposes). I added that note to the commit message as
well.
diff mbox

Patch

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 0214b38..e3c0c2c 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -6345,6 +6345,8 @@  static char * wpas_global_ctrl_iface_redir_p2p(struct wpa_global *global,
 {
 #ifdef CONFIG_P2P
 	static const char * cmd[] = {
+		"LIST_NETWORKS",
+		"SAVE_CONFIG",
 		"P2P_FIND",
 		"P2P_STOP_FIND",
 		"P2P_LISTEN",
@@ -6359,6 +6361,12 @@  static char * wpas_global_ctrl_iface_redir_p2p(struct wpa_global *global,
 		NULL
 	};
 	static const char * prefix[] = {
+#ifdef ANDROID
+		"DRIVER ",
+#endif
+		"GET_NETWORK ",
+		"REMOVE_NETWORK ",
+		"SET ",
 		"P2P_FIND ",
 		"P2P_CONNECT ",
 		"P2P_LISTEN ",