wpa_cli: Add ACL and BTM control commands
Add AP mode commands for ACL and BTM into wpa_cli similarly to the way these were already available in hostapd_cli. Signed-off-by: Chaoli Zhou <quic_zchaoli@quicinc.com>
This commit is contained in:
parent
00622fcfef
commit
d9121335a0
1 changed files with 51 additions and 0 deletions
|
@ -2046,6 +2046,20 @@ static int wpa_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc,
|
||||||
return wpa_ctrl_command(ctrl, "UPDATE_BEACON");
|
return wpa_ctrl_command(ctrl, "UPDATE_BEACON");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int wpa_cli_cmd_accept_macacl(struct wpa_ctrl *ctrl, int argc,
|
||||||
|
char *argv[])
|
||||||
|
{
|
||||||
|
return wpa_cli_cmd(ctrl, "ACCEPT_ACL", 1, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int wpa_cli_cmd_deny_macacl(struct wpa_ctrl *ctrl, int argc,
|
||||||
|
char *argv[])
|
||||||
|
{
|
||||||
|
return wpa_cli_cmd(ctrl, "DENY_ACL", 1, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_AP */
|
#endif /* CONFIG_AP */
|
||||||
|
|
||||||
|
|
||||||
|
@ -2894,6 +2908,31 @@ static int wpa_cli_cmd_wnm_bss_query(struct wpa_ctrl *ctrl, int argc, char *argv
|
||||||
#endif /* CONFIG_WNM */
|
#endif /* CONFIG_WNM */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_WNM_AP
|
||||||
|
|
||||||
|
static int wpa_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
|
||||||
|
char *argv[])
|
||||||
|
{
|
||||||
|
return wpa_cli_cmd(ctrl, "DISASSOC_IMMINENT", 2, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int wpa_cli_cmd_ess_disassoc(struct wpa_ctrl *ctrl, int argc,
|
||||||
|
char *argv[])
|
||||||
|
{
|
||||||
|
return wpa_cli_cmd(ctrl, "ESS_DISASSOC", 3, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int wpa_cli_cmd_bss_tm_req(struct wpa_ctrl *ctrl, int argc,
|
||||||
|
char *argv[])
|
||||||
|
{
|
||||||
|
return wpa_cli_cmd(ctrl, "BSS_TM_REQ", 1, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_WNM_AP */
|
||||||
|
|
||||||
|
|
||||||
static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc == 0)
|
if (argc == 0)
|
||||||
|
@ -3599,6 +3638,10 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
|
||||||
{ "update_beacon", wpa_cli_cmd_update_beacon, NULL,
|
{ "update_beacon", wpa_cli_cmd_update_beacon, NULL,
|
||||||
cli_cmd_flag_none,
|
cli_cmd_flag_none,
|
||||||
"= update Beacon frame contents"},
|
"= update Beacon frame contents"},
|
||||||
|
{ "accept_acl", wpa_cli_cmd_accept_macacl, NULL, cli_cmd_flag_none,
|
||||||
|
"=Add/Delete/Show/Clear allow MAC ACL" },
|
||||||
|
{ "deny_acl", wpa_cli_cmd_deny_macacl, NULL, cli_cmd_flag_none,
|
||||||
|
"=Add/Delete/Show/Clear deny MAC ACL" },
|
||||||
#endif /* CONFIG_AP */
|
#endif /* CONFIG_AP */
|
||||||
{ "suspend", wpa_cli_cmd_suspend, NULL, cli_cmd_flag_none,
|
{ "suspend", wpa_cli_cmd_suspend, NULL, cli_cmd_flag_none,
|
||||||
"= notification of suspend/hibernate" },
|
"= notification of suspend/hibernate" },
|
||||||
|
@ -3845,6 +3888,14 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
|
||||||
" [neighbor=<BSSID>,<BSSID information>,<operating class>,<channel number>,<PHY type>[,<hexdump of optional subelements>]"
|
" [neighbor=<BSSID>,<BSSID information>,<operating class>,<channel number>,<PHY type>[,<hexdump of optional subelements>]"
|
||||||
" = Send BSS Transition Management Query" },
|
" = Send BSS Transition Management Query" },
|
||||||
#endif /* CONFIG_WNM */
|
#endif /* CONFIG_WNM */
|
||||||
|
#ifdef CONFIG_WNM_AP
|
||||||
|
{ "disassoc_imminent", wpa_cli_cmd_disassoc_imminent, NULL, cli_cmd_flag_none,
|
||||||
|
"= send Disassociation Imminent notification" },
|
||||||
|
{ "ess_disassoc", wpa_cli_cmd_ess_disassoc, NULL, cli_cmd_flag_none,
|
||||||
|
"= send ESS Dissassociation Imminent notification" },
|
||||||
|
{ "bss_tm_req", wpa_cli_cmd_bss_tm_req, NULL, cli_cmd_flag_none,
|
||||||
|
"= send BSS Transition Management Request" },
|
||||||
|
#endif /* CONFIG_WNM_AP */
|
||||||
{ "raw", wpa_cli_cmd_raw, NULL, cli_cmd_flag_sensitive,
|
{ "raw", wpa_cli_cmd_raw, NULL, cli_cmd_flag_sensitive,
|
||||||
"<params..> = Sent unprocessed command" },
|
"<params..> = Sent unprocessed command" },
|
||||||
{ "flush", wpa_cli_cmd_flush, NULL, cli_cmd_flag_none,
|
{ "flush", wpa_cli_cmd_flush, NULL, cli_cmd_flag_none,
|
||||||
|
|
Loading…
Reference in a new issue