]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Add DPP_CHIRP commands to hostapd_cli and wpa_cli
authorWystan Schmidt <wystans@gmail.com>
Fri, 24 Jul 2020 21:29:39 +0000 (15:29 -0600)
committerJouni Malinen <j@w1.fi>
Sun, 11 Oct 2020 17:26:21 +0000 (20:26 +0300)
Add the DPP control interface chirp commands to the CLIs for greater
visibility and ease of use.

Signed-off-by: Wystan Schmidt <wystan.schmidt@charter.com>
hostapd/hostapd_cli.c
wpa_supplicant/wpa_cli.c

index 01dcfe82326ccbf98539ff33b5bc2cd4b1824120..363ae0ee74c807439a1797c217e124f5a88dd377 100644 (file)
@@ -1471,6 +1471,23 @@ static int hostapd_cli_cmd_dpp_pkex_remove(struct wpa_ctrl *ctrl, int argc,
        return hostapd_cli_cmd(ctrl, "DPP_PKEX_REMOVE", 1, argc, argv);
 }
 
+
+#ifdef CONFIG_DPP2
+
+static int hostapd_cli_cmd_dpp_chirp(struct wpa_ctrl *ctrl, int argc,
+                                    char *argv[])
+{
+       return hostapd_cli_cmd(ctrl, "DPP_CHIRP", 1, argc, argv);
+}
+
+
+static int hostapd_cli_cmd_dpp_stop_chirp(struct wpa_ctrl *ctrl, int argc,
+                                         char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "DPP_STOP_CHIRP");
+}
+
+#endif /* CONFIG_DPP2 */
 #endif /* CONFIG_DPP */
 
 
@@ -1679,6 +1696,12 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
          "add PKEX code" },
        { "dpp_pkex_remove", hostapd_cli_cmd_dpp_pkex_remove, NULL,
          "*|<id> = remove DPP pkex information" },
+#ifdef CONFIG_DPP2
+       { "dpp_chirp", hostapd_cli_cmd_dpp_chirp, NULL,
+         "own=<BI ID> iter=<count> = start DPP chirp" },
+       { "dpp_stop_chirp", hostapd_cli_cmd_dpp_stop_chirp, NULL,
+         "= stop DPP chirp" },
+#endif /* CONFIG_DPP2 */
 #endif /* CONFIG_DPP */
        { "accept_acl", hostapd_cli_cmd_accept_macacl, NULL,
          "=Add/Delete/Show/Clear accept MAC ACL" },
index 5c7f5eef331c28487fd283baaf68856308cbe9fe..51c9642e9023c77ac50be9b12877fec8fb215f31 100644 (file)
@@ -3063,6 +3063,23 @@ static int wpa_cli_cmd_dpp_pkex_remove(struct wpa_ctrl *ctrl, int argc,
        return wpa_cli_cmd(ctrl, "DPP_PKEX_REMOVE", 1, argc, argv);
 }
 
+
+#ifdef CONFIG_DPP2
+
+static int wpa_cli_cmd_dpp_chirp(struct wpa_ctrl *ctrl, int argc,
+                                char *argv[])
+{
+       return wpa_cli_cmd(ctrl, "DPP_CHIRP", 1, argc, argv);
+}
+
+
+static int wpa_cli_cmd_dpp_stop_chirp(struct wpa_ctrl *ctrl, int argc,
+                                     char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "DPP_STOP_CHIRP");
+}
+
+#endif /* CONFIG_DPP2 */
 #endif /* CONFIG_DPP */
 
 
@@ -3799,6 +3816,14 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
        { "dpp_pkex_remove", wpa_cli_cmd_dpp_pkex_remove, NULL,
          cli_cmd_flag_none,
          "*|<id> = remove DPP pkex information" },
+#ifdef CONFIG_DPP2
+       { "dpp_chirp", wpa_cli_cmd_dpp_chirp, NULL,
+         cli_cmd_flag_none,
+         "own=<BI ID> iter=<count> = start DPP chirp" },
+       { "dpp_stop_chirp", wpa_cli_cmd_dpp_stop_chirp, NULL,
+         cli_cmd_flag_none,
+         "= stop DPP chirp" },
+#endif /* CONFIG_DPP2 */
 #endif /* CONFIG_DPP */
        { "all_bss", wpa_cli_cmd_all_bss, NULL, cli_cmd_flag_none,
          "= list all BSS entries (scan results)" },