diff options
author | Anirban Sirkhell <anirban@qca.qualcomm.com> | 2012-03-18 20:23:31 -1000 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2012-03-30 11:11:35 +0300 |
commit | 4c374cde2f0b789d5aa1180667173358b71d492c (patch) | |
tree | 277ea8e47a22683b8a5c1a31bb38cc74d1439df4 /hostapd | |
parent | 21d996f775a2131bb0c73d6e18ca9b382f017057 (diff) | |
download | external_wpa_supplicant_8_ti-4c374cde2f0b789d5aa1180667173358b71d492c.zip external_wpa_supplicant_8_ti-4c374cde2f0b789d5aa1180667173358b71d492c.tar.gz external_wpa_supplicant_8_ti-4c374cde2f0b789d5aa1180667173358b71d492c.tar.bz2 |
Add wps_cancel for hostapd_cli
Implement wps_cancel for hostapd similarly to how it was already
supported in wpa_supplicant AP mode.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd')
-rw-r--r-- | hostapd/ctrl_iface.c | 3 | ||||
-rw-r--r-- | hostapd/hostapd_cli.c | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index b1bafc1..63fe557 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -755,6 +755,9 @@ static void hostapd_ctrl_iface_receive(int sock, void *eloop_ctx, } else if (os_strcmp(buf, "WPS_PBC") == 0) { if (hostapd_wps_button_pushed(hapd, NULL)) reply_len = -1; + } else if (os_strcmp(buf, "WPS_CANCEL") == 0) { + if (hostapd_wps_cancel(hapd)) + reply_len = -1; #ifdef CONFIG_WPS_OOB } else if (os_strncmp(buf, "WPS_OOB ", 8) == 0) { if (hostapd_ctrl_iface_wps_oob(hapd, buf + 8)) diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index 89125fd..e2d9f9f 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -392,6 +392,13 @@ static int hostapd_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc, } +static int hostapd_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc, + char *argv[]) +{ + return wpa_ctrl_command(ctrl, "WPS_CANCEL"); +} + + #ifdef CONFIG_WPS_OOB static int hostapd_cli_cmd_wps_oob(struct wpa_ctrl *ctrl, int argc, char *argv[]) @@ -719,6 +726,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = { { "wps_pin", hostapd_cli_cmd_wps_pin }, { "wps_check_pin", hostapd_cli_cmd_wps_check_pin }, { "wps_pbc", hostapd_cli_cmd_wps_pbc }, + { "wps_cancel", hostapd_cli_cmd_wps_cancel }, #ifdef CONFIG_WPS_OOB { "wps_oob", hostapd_cli_cmd_wps_oob }, #endif /* CONFIG_WPS_OOB */ |