]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd_cli: Add CLI commands enable, reload, and disable
authorCedric Baudelet <cedric.baudelet@intel.com>
Tue, 29 Apr 2014 13:29:14 +0000 (15:29 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 12 Oct 2014 16:27:13 +0000 (19:27 +0300)
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>
hostapd/hostapd_cli.c

index 9e62befc39db96ae25d8283aec2ec2f7f300e31c..283e20fb08cc91aa1d05e1929a20f03105a97d7d 100644 (file)
@@ -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 }
 };