]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add hostapd_cli poll_sta command
authorBhagavathi Perumal S <bperumal@codeaurora.org>
Tue, 6 Mar 2018 09:00:11 +0000 (14:30 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 19 Mar 2018 17:14:40 +0000 (19:14 +0200)
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>
hostapd/hostapd_cli.c

index e937d9c94d1b3e3d954f825f5f4940b91b776a7f..fbec5d24612dda3323b3f4e7547a258b0e955c4d 100644 (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 {
        const char *cmd;
        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" },
        { "deny_acl", hostapd_cli_cmd_deny_macacl, NULL,
          "=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 }
 };