Remove 'interface=iface' command prefix
Change-Id: I01caeeff2cf356afb4ce0453d7a78f7ecfae1de6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 545fefd..1b4b9b0 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -176,30 +176,6 @@
else
reply_len = 2;
} else {
-#if defined(CONFIG_P2P) && defined(ANDROID_P2P)
- char *ifname, *ifend;
-
- ifname = os_strstr(buf, "interface=");
- if (ifname != NULL) {
- ifend = os_strchr(ifname + 10, ' ');
- if (ifend != NULL)
- *ifend++ = '\0';
- else
- *(ifname - 1) = '\0';
- wpa_printf(MSG_DEBUG, "Found %s", ifname);
- for (wpa_s = wpa_s->global->ifaces; wpa_s; wpa_s = wpa_s->next) {
- if (os_strcmp(wpa_s->ifname, ifname + 10) == 0)
- break;
- }
- if (wpa_s == NULL) {
- wpa_printf(MSG_ERROR, "P2P: %s does not exist", ifname);
- wpa_s = eloop_ctx;
- }
- if (ifend != NULL)
- os_memmove(ifname, ifend, strlen(ifend) + 1);
- wpa_printf(MSG_INFO, "wpa_s->ifname %s cmd %s", wpa_s ? wpa_s->ifname : "NULL", buf);
- }
-#endif /* defined CONFIG_P2P && defined ANDROID_P2P */
reply = wpa_supplicant_ctrl_iface_process(wpa_s, buf,
&reply_len);
}
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 20cd45e..968534e 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -82,9 +82,6 @@
static int ping_interval = 5;
static int interactive = 0;
static char *ifname_prefix = NULL;
-#if defined(CONFIG_P2P) && defined(ANDROID_P2P)
-static char* redirect_interface = NULL;
-#endif
struct cli_txt_entry {
struct dl_list list;
@@ -402,9 +399,6 @@
static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, char *cmd, int print)
{
char buf[4096];
-#if defined(CONFIG_P2P) && defined(ANDROID_P2P)
- char _cmd[256];
-#endif
size_t len;
int ret;
@@ -412,22 +406,6 @@
printf("Not connected to wpa_supplicant - command dropped.\n");
return -1;
}
-#if defined(CONFIG_P2P) && defined(ANDROID_P2P)
- if (redirect_interface) {
- char *arg;
- arg = os_strchr(cmd, ' ');
- if (arg) {
- *arg++ = '\0';
- ret = os_snprintf(_cmd, sizeof(_cmd), "%s %s %s", cmd, redirect_interface, arg);
- }
- else {
- ret = os_snprintf(_cmd, sizeof(_cmd), "%s %s", cmd, redirect_interface);
- }
- cmd = _cmd;
- os_free(redirect_interface);
- redirect_interface = NULL;
- }
-#endif
len = sizeof(buf) - 1;
ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len,
wpa_cli_msg_cb);
@@ -3015,13 +2993,6 @@
printf("Unknown command '%s'\n", argv[0]);
ret = 1;
} else {
-#if defined(CONFIG_P2P) && defined(ANDROID_P2P)
- if ( (argc >= 2) && (os_strncmp(argv[1], "interface=", 10) == 0)) {
- redirect_interface = os_strdup(argv[1]);
- ret = match->handler(ctrl, argc - 2, &argv[2]);
- }
- else
-#endif
ret = match->handler(ctrl, argc - 1, &argv[1]);
}