diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 339eb9bff..a67eb36ed 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -334,7 +334,7 @@ static int wpa_supplicant_ctrl_iface_wps_oob(struct wpa_supplicant *wpa_s, static int wpa_supplicant_ctrl_iface_wps_reg(struct wpa_supplicant *wpa_s, char *cmd) { - u8 bssid[ETH_ALEN], *_bssid = bssid; + u8 bssid[ETH_ALEN]; char *pin; char *new_ssid; char *new_auth; @@ -347,9 +347,7 @@ static int wpa_supplicant_ctrl_iface_wps_reg(struct wpa_supplicant *wpa_s, return -1; *pin++ = '\0'; - if (os_strcmp(cmd, "any") == 0) - _bssid = NULL; - else if (hwaddr_aton(cmd, bssid)) { + if (hwaddr_aton(cmd, bssid)) { wpa_printf(MSG_DEBUG, "CTRL_IFACE WPS_REG: invalid BSSID '%s'", cmd); return -1; @@ -357,7 +355,7 @@ static int wpa_supplicant_ctrl_iface_wps_reg(struct wpa_supplicant *wpa_s, new_ssid = os_strchr(pin, ' '); if (new_ssid == NULL) - return wpas_wps_start_reg(wpa_s, _bssid, pin, NULL); + return wpas_wps_start_reg(wpa_s, bssid, pin, NULL); *new_ssid++ = '\0'; new_auth = os_strchr(new_ssid, ' '); @@ -380,7 +378,7 @@ static int wpa_supplicant_ctrl_iface_wps_reg(struct wpa_supplicant *wpa_s, ap.auth = new_auth; ap.encr = new_encr; ap.key_hex = new_key; - return wpas_wps_start_reg(wpa_s, _bssid, pin, &ap); + return wpas_wps_start_reg(wpa_s, bssid, pin, &ap); } diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 5e355a56f..17afc5faa 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -717,11 +717,11 @@ static int wpa_cli_cmd_wps_reg(struct wpa_ctrl *ctrl, int argc, char *argv[]) key_hex); } else { printf("Invalid WPS_REG command: need two arguments:\n" - "- BSSID: use 'any' to select any\n" + "- BSSID of the target AP\n" "- AP PIN\n"); printf("Alternatively, six arguments can be used to " "reconfigure the AP:\n" - "- BSSID: use 'any' to select any\n" + "- BSSID of the target AP\n" "- AP PIN\n" "- new SSID\n" "- new auth (OPEN, WPAPSK, WPA2PSK)\n"