aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2015-11-03 14:30:11 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-22 15:50:05 (GMT)
commitcadffacb3f883e7cce1492bc8ad4c0fd23aaea76 (patch)
treefcd0094c45d12fa83adccf9e4587af6c7662e808 /wpa_supplicant/wpa_cli.c
parent0f039e343273e89c0e9bd9e047d2191dd706099c (diff)
downloadhostap-cadffacb3f883e7cce1492bc8ad4c0fd23aaea76.zip
hostap-cadffacb3f883e7cce1492bc8ad4c0fd23aaea76.tar.gz
hostap-cadffacb3f883e7cce1492bc8ad4c0fd23aaea76.tar.bz2
wpa_cli: Add an option to set created interface type
Add an option to set the interface type when creating a driver interface. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 91ddb5a..add7ea0 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1872,14 +1872,15 @@ static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc,
/*
* INTERFACE_ADD <ifname>TAB<confname>TAB<driver>TAB<ctrl_interface>TAB
- * <driver_param>TAB<bridge_name>[TAB<create>]
+ * <driver_param>TAB<bridge_name>[TAB<create>[TAB<type>]]
*/
res = os_snprintf(cmd, sizeof(cmd),
- "INTERFACE_ADD %s\t%s\t%s\t%s\t%s\t%s\t%s",
+ "INTERFACE_ADD %s\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
argv[0],
argc > 1 ? argv[1] : "", argc > 2 ? argv[2] : "",
argc > 3 ? argv[3] : "", argc > 4 ? argv[4] : "",
- argc > 5 ? argv[5] : "", argc > 6 ? argv[6] : "");
+ argc > 5 ? argv[5] : "", argc > 6 ? argv[6] : "",
+ argc > 7 ? argv[7] : "");
if (os_snprintf_error(sizeof(cmd), res))
return -1;
cmd[sizeof(cmd) - 1] = '\0';
@@ -3044,8 +3045,10 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
{ "interface_add", wpa_cli_cmd_interface_add, NULL,
cli_cmd_flag_none,
"<ifname> <confname> <driver> <ctrl_interface> <driver_param>\n"
- " <bridge_name> = adds new interface, all parameters but <ifname>\n"
- " are optional" },
+ " <bridge_name> <create> <type> = adds new interface, all "
+ "parameters but\n"
+ " <ifname> are optional. Supported types are station ('sta') and "
+ "AP ('ap')" },
{ "interface_remove", wpa_cli_cmd_interface_remove, NULL,
cli_cmd_flag_none,
"<ifname> = removes the interface" },