diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-06-13 20:32:04 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-06-13 20:32:04 +0000 |
commit | 60c44471bf25f9e84d8701afe1bbcbcc88e18c89 (patch) | |
tree | 538db23d436787038f980271529ae2be44235c1b /hostapd/hostapd_cli.c | |
parent | ced3a3de988600636bda6479d27de8823307f171 (diff) | |
download | FreeBSD-src-60c44471bf25f9e84d8701afe1bbcbcc88e18c89.zip FreeBSD-src-60c44471bf25f9e84d8701afe1bbcbcc88e18c89.tar.gz |
Import wpa_supplicant & hostapd 0.6.9.
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r-- | hostapd/hostapd_cli.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index 2614113..c2ecd4e 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -87,7 +87,7 @@ static const char *commands_help = " sa_query <addr> send SA Query to a station\n" #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_WPS -" wps_pin <uuid> <pin> add WPS Enrollee PIN (Device Password)\n" +" wps_pin <uuid> <pin> [timeout] add WPS Enrollee PIN (Device Password)\n" " wps_pbc indicate button pushed to initiate PBC\n" #endif /* CONFIG_WPS */ " help show this usage help\n" @@ -260,12 +260,16 @@ static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) { char buf[64]; - if (argc != 2) { - printf("Invalid 'wps_pin' command - exactly two arguments, " + if (argc < 2) { + printf("Invalid 'wps_pin' command - at least two arguments, " "UUID and PIN, are required.\n"); return -1; } - snprintf(buf, sizeof(buf), "WPS_PIN %s %s", argv[0], argv[1]); + if (argc > 2) + snprintf(buf, sizeof(buf), "WPS_PIN %s %s %s", + argv[0], argv[1], argv[2]); + else + snprintf(buf, sizeof(buf), "WPS_PIN %s %s", argv[0], argv[1]); return wpa_ctrl_command(ctrl, buf); } |