DPP2: Add DPP_CHIRP commands to hostapd_cli and wpa_cli

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>
This commit is contained in:
Wystan Schmidt 2020-07-24 15:29:39 -06:00 committed by Jouni Malinen
parent cb3b709367
commit e3b47cdf86
2 changed files with 48 additions and 0 deletions

View 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); 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 */ #endif /* CONFIG_DPP */
@ -1679,6 +1696,12 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
"add PKEX code" }, "add PKEX code" },
{ "dpp_pkex_remove", hostapd_cli_cmd_dpp_pkex_remove, NULL, { "dpp_pkex_remove", hostapd_cli_cmd_dpp_pkex_remove, NULL,
"*|<id> = remove DPP pkex information" }, "*|<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 */ #endif /* CONFIG_DPP */
{ "accept_acl", hostapd_cli_cmd_accept_macacl, NULL, { "accept_acl", hostapd_cli_cmd_accept_macacl, NULL,
"=Add/Delete/Show/Clear accept MAC ACL" }, "=Add/Delete/Show/Clear accept MAC ACL" },

View 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); 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 */ #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, { "dpp_pkex_remove", wpa_cli_cmd_dpp_pkex_remove, NULL,
cli_cmd_flag_none, cli_cmd_flag_none,
"*|<id> = remove DPP pkex information" }, "*|<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 */ #endif /* CONFIG_DPP */
{ "all_bss", wpa_cli_cmd_all_bss, NULL, cli_cmd_flag_none, { "all_bss", wpa_cli_cmd_all_bss, NULL, cli_cmd_flag_none,
"= list all BSS entries (scan results)" }, "= list all BSS entries (scan results)" },