Add hostapd_cli poll_sta command

This uses the already existing POLL_STA control interface to poll an
associated station to check connectivity.

Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
This commit is contained in:
Bhagavathi Perumal S 2018-03-06 14:30:11 +05:30 committed by Jouni Malinen
parent f5701cc66e
commit 2df73f52e8

View file

@ -1473,6 +1473,13 @@ static int hostapd_cli_cmd_deny_macacl(struct wpa_ctrl *ctrl, int argc,
} }
static int hostapd_cli_cmd_poll_sta(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
return hostapd_cli_cmd(ctrl, "POLL_STA", 1, argc, argv);
}
struct hostapd_cli_cmd { struct hostapd_cli_cmd {
const char *cmd; const char *cmd;
int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]); int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
@ -1642,6 +1649,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
"=Add/Delete/Show/Clear accept MAC ACL" }, "=Add/Delete/Show/Clear accept MAC ACL" },
{ "deny_acl", hostapd_cli_cmd_deny_macacl, NULL, { "deny_acl", hostapd_cli_cmd_deny_macacl, NULL,
"=Add/Delete/Show/Clear deny MAC ACL" }, "=Add/Delete/Show/Clear deny MAC ACL" },
{ "poll_sta", hostapd_cli_cmd_poll_sta, hostapd_complete_stations,
"<addr> = poll a STA to check connectivity with a QoS null frame" },
{ NULL, NULL, NULL, NULL } { NULL, NULL, NULL, NULL }
}; };