X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=hostapd%2Fhostapd_cli.c;h=4f22e853cc3f0488470b98b6ab1e5c0676be6a1c;hb=31fcea931d916fd3dec2522822f87a7148b45a99;hp=589530e419fc60e74a8ab72ddcf705cad28d3ecf;hpb=f439079e93dfff93d184df727bb8bedef4a9fcb2;p=libeap.git diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index 589530e..4f22e85 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -89,7 +89,7 @@ static const char *commands_help = " sa_query send SA Query to a station\n" #endif /* CONFIG_IEEE80211W */ #ifdef CONFIG_WPS -" wps_pin [timeout] add WPS Enrollee PIN (Device Password)\n" +" wps_pin [timeout] [addr] add WPS Enrollee PIN\n" " wps_pbc indicate button pushed to initiate PBC\n" #ifdef CONFIG_WPS_OOB " wps_oob use WPS with out-of-band (UFD)\n" @@ -352,13 +352,16 @@ static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc, static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) { - char buf[64]; + char buf[256]; if (argc < 2) { printf("Invalid 'wps_pin' command - at least two arguments, " "UUID and PIN, are required.\n"); return -1; } - if (argc > 2) + if (argc > 3) + snprintf(buf, sizeof(buf), "WPS_PIN %s %s %s %s", + argv[0], argv[1], argv[2], argv[3]); + else if (argc > 2) snprintf(buf, sizeof(buf), "WPS_PIN %s %s %s", argv[0], argv[1], argv[2]); else