aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorJeffin Mammen <jmammen@qti.qualcomm.com>2013-08-23 13:03:15 (GMT)
committerJouni Malinen <j@w1.fi>2013-08-23 14:49:01 (GMT)
commit3351a3847c6630285052c0c039e54f71caf5b82a (patch)
treeb7a92adc65be0c4672ebf5c93052f261e4a07018 /hostapd/hostapd_cli.c
parente96872a4f204d4da17810eddee0c6eeace5d956e (diff)
downloadhostap-3351a3847c6630285052c0c039e54f71caf5b82a.zip
hostap-3351a3847c6630285052c0c039e54f71caf5b82a.tar.gz
hostap-3351a3847c6630285052c0c039e54f71caf5b82a.tar.bz2
WPS: Add control interface command for fetching latest status
The new wps_get_status command can be used to fetch the result of the latest WPS operation and the current PBC state from hostapd. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 661f709..5f48fc8 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -79,6 +79,7 @@ static const char *commands_help =
#endif /* CONFIG_WPS_NFC */
" wps_ap_pin <cmd> [params..] enable/disable AP PIN\n"
" wps_config <SSID> <auth> <encr> <key> configure AP\n"
+" wps_get_status show current WPS status\n"
#endif /* CONFIG_WPS */
" get_config show current configuration\n"
" help show this usage help\n"
@@ -517,6 +518,13 @@ static int hostapd_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc,
}
+static int hostapd_cli_cmd_wps_get_status(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "WPS_GET_STATUS");
+}
+
+
static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
@@ -818,6 +826,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
#endif /* CONFIG_WPS_NFC */
{ "wps_ap_pin", hostapd_cli_cmd_wps_ap_pin },
{ "wps_config", hostapd_cli_cmd_wps_config },
+ { "wps_get_status", hostapd_cli_cmd_wps_get_status },
#endif /* CONFIG_WPS */
{ "disassoc_imminent", hostapd_cli_cmd_disassoc_imminent },
{ "ess_disassoc", hostapd_cli_cmd_ess_disassoc },