aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorDavid Spinadel <david.spinadel@intel.com>2016-04-06 16:42:11 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-17 09:29:12 (GMT)
commitf4f185a224ffde55802ce33a856dd3ddf929dfcf (patch)
tree03eceb1be6d1844d7e6ca86ac39b89cbbbb272fe /hostapd/hostapd_cli.c
parent629e1804da3bb6eed347b51922fc2fe6aa05f2e5 (diff)
downloadhostap-f4f185a224ffde55802ce33a856dd3ddf929dfcf.zip
hostap-f4f185a224ffde55802ce33a856dd3ddf929dfcf.tar.gz
hostap-f4f185a224ffde55802ce33a856dd3ddf929dfcf.tar.bz2
hostapd: Add LCI request
Add a hostapd control interface command REQ_LCI to request LCI from an associated station using radio measurement. Signed-off-by: David Spinadel <david.spinadel@intel.com>
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index ec91f7e..563d8d5 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -1186,6 +1186,26 @@ static int hostapd_cli_cmd_remove_neighbor(struct wpa_ctrl *ctrl, int argc,
}
+static int hostapd_cli_cmd_req_lci(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ char cmd[256];
+ int res;
+
+ if (argc != 1) {
+ printf("Invalid req_lci command - requires destination address\n");
+ return -1;
+ }
+
+ res = os_snprintf(cmd, sizeof(cmd), "REQ_LCI %s", argv[0]);
+ if (os_snprintf_error(sizeof(cmd), res)) {
+ printf("Too long REQ_LCI command.\n");
+ return -1;
+ }
+ return wpa_ctrl_command(ctrl, cmd);
+}
+
+
struct hostapd_cli_cmd {
const char *cmd;
int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
@@ -1249,6 +1269,7 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "pmksa_flush", hostapd_cli_cmd_pmksa_flush },
{ "set_neighbor", hostapd_cli_cmd_set_neighbor },
{ "remove_neighbor", hostapd_cli_cmd_remove_neighbor },
+ { "req_lci", hostapd_cli_cmd_req_lci },
{ NULL, NULL }
};