hostapd patch review: 'hostapd: Enable CLI commands enable, reload and disable'

Baudelet, Cedric cedric.baudelet
Thu Jul 10 00:47:38 PDT 2014


Dear all,

Could you please review following hostapd patch?

Thanks.

Best regards,

Cedric Baudelet

Author: Cedric Baudelet <cedric.baudelet at intel.com>
Date:   Tue Apr 29 15:29:14 2014 +0200

    hostapd: Enable CLI commands enable, reload and disable

    Commands are 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 and adds functions
    hostapd_cli_cmd_enable(), hostapd_cli_cmd_reload()
    and hostapd_cli_cmd_disable(). It also declares
    "enable", "reload" and "disable" as part of struct
    hostapd_cli_cmd hostapd_cli_commands[].

    Signed-off-by: Cedric Baudelet <cedric.baudelet at intel.com>

diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 1c4a84c..6fa0f03 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -940,6 +940,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];
@@ -1010,6 +1031,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 }
 };

(END)
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the Hostap mailing list