]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add "stop_ap" command for hostapd_cli
authorChenming Huang <quic_chenhuan@quicinc.com>
Tue, 5 Dec 2023 07:40:38 +0000 (13:10 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 28 Feb 2024 20:34:08 +0000 (22:34 +0200)
Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
hostapd/hostapd_cli.c

index 8fb6119c8382041bc81e1d72753773f7aade5a00..118991b915dbc251c11b0b5abea8899490bce6e1 100644 (file)
@@ -1270,6 +1270,13 @@ static int hostapd_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc,
 }
 
 
+static int hostapd_cli_cmd_stop_ap(struct wpa_ctrl *ctrl, int argc,
+                                  char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "STOP_AP");
+}
+
+
 static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
 {
        char cmd[256];
@@ -1759,6 +1766,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
          "= disable AP MLD to which the interface is affiliated" },
        { "update_beacon", hostapd_cli_cmd_update_beacon, NULL,
          "= update Beacon frame contents\n"},
+       { "stop_ap", hostapd_cli_cmd_stop_ap, NULL,
+         "= stop AP\n"},
        { "erp_flush", hostapd_cli_cmd_erp_flush, NULL,
          "= drop all ERP keys"},
        { "log_level", hostapd_cli_cmd_log_level, NULL,