aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorCedric Baudelet <cedric.baudelet@intel.com>2014-04-29 13:29:14 (GMT)
committerJouni Malinen <j@w1.fi>2014-10-12 16:27:13 (GMT)
commita6938b79b42cb99e010c41457db8b71331bd8ebb (patch)
tree287a5503c26e362e0023bbb3cdcbb200a0f66699 /hostapd/hostapd_cli.c
parenta62941415a3116416459418401edded0dcb535cc (diff)
downloadhostap-a6938b79b42cb99e010c41457db8b71331bd8ebb.zip
hostap-a6938b79b42cb99e010c41457db8b71331bd8ebb.tar.gz
hostap-a6938b79b42cb99e010c41457db8b71331bd8ebb.tar.bz2
hostapd_cli: Add CLI commands enable, reload, and disable
Commands are already present in ctrl_iface.c (and parsed in hostapd_ctrl_iface_receive() function) but not in hostapd_cli.c. This patch updates hostapd_cli.c with matching functions. Signed-off-by: Cedric Baudelet <cedric.baudelet@intel.com>
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 9e62bef..283e20f 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -933,6 +933,27 @@ static int hostapd_cli_cmd_chan_switch(struct wpa_ctrl *ctrl,
}
+static int hostapd_cli_cmd_enable(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "ENABLE");
+}
+
+
+static int hostapd_cli_cmd_reload(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "RELOAD");
+}
+
+
+static int hostapd_cli_cmd_disable(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "DISABLE");
+}
+
+
static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
char cmd[256];
@@ -1003,6 +1024,9 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "hs20_wnm_notif", hostapd_cli_cmd_hs20_wnm_notif },
{ "hs20_deauth_req", hostapd_cli_cmd_hs20_deauth_req },
{ "vendor", hostapd_cli_cmd_vendor },
+ { "enable", hostapd_cli_cmd_enable },
+ { "reload", hostapd_cli_cmd_reload },
+ { "disable", hostapd_cli_cmd_disable },
{ NULL, NULL }
};