diff options
| author | Anton Nayshtut <qca_antonn@qca.qualcomm.com> | 2015-01-21 15:30:48 +0200 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:19:32 -0600 |
| commit | a724610c002e3e4a9f6ae544cd9a93cbcdc582e7 (patch) | |
| tree | ae797f3b5ed5141148a559a59705b02f63e2e81b /hostapd/hostapd_cli.c | |
| parent | 3a08d5f7dfcf846c2c394d29a71df1b379df98a5 (diff) | |
| download | android_external_wpa_supplicant_8-a724610c002e3e4a9f6ae544cd9a93cbcdc582e7.tar.gz android_external_wpa_supplicant_8-a724610c002e3e4a9f6ae544cd9a93cbcdc582e7.tar.bz2 android_external_wpa_supplicant_8-a724610c002e3e4a9f6ae544cd9a93cbcdc582e7.zip | |
FST: Add hostapd_cli fst command
This can be used to issue FST-MANAGER control interface commands.
Change-Id: I693c54d226be03a742e71f4a3733f6a50ede4327
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: ee039107770ee8dd4c8c54fc762796e74c34e601
Git-repo: git://w1.fi/srv/git/hostap.git
CRs-Fixed: 891455
Diffstat (limited to 'hostapd/hostapd_cli.c')
| -rw-r--r-- | hostapd/hostapd_cli.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index e2991836..42f8bd48 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -922,6 +922,35 @@ static int hostapd_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) } +#ifdef CONFIG_FST +static int hostapd_cli_cmd_fst(struct wpa_ctrl *ctrl, int argc, char *argv[]) +{ + char cmd[256]; + int res; + int i; + int total; + + if (argc <= 0) { + printf("FST command: parameters are required.\n"); + return -1; + } + + total = os_snprintf(cmd, sizeof(cmd), "FST-MANAGER"); + + for (i = 0; i < argc; i++) { + res = os_snprintf(cmd + total, sizeof(cmd) - total, " %s", + argv[i]); + if (os_snprintf_error(sizeof(cmd) - total, res)) { + printf("Too long fst command.\n"); + return -1; + } + total += res; + } + return wpa_ctrl_command(ctrl, cmd); +} +#endif /* CONFIG_FST */ + + static int hostapd_cli_cmd_chan_switch(struct wpa_ctrl *ctrl, int argc, char *argv[]) { @@ -1049,6 +1078,9 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = { { "get_config", hostapd_cli_cmd_get_config }, { "help", hostapd_cli_cmd_help }, { "interface", hostapd_cli_cmd_interface }, +#ifdef CONFIG_FST + { "fst", hostapd_cli_cmd_fst }, +#endif /* CONFIG_FST */ { "level", hostapd_cli_cmd_level }, { "license", hostapd_cli_cmd_license }, { "quit", hostapd_cli_cmd_quit }, |
