diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 4a8478c53..d4b32e338 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -619,8 +619,11 @@ static int wpa_supplicant_ctrl_iface_wps_oob(struct wpa_supplicant *wpa_s, return wpas_wps_start_oob(wpa_s, cmd, path, method, name); } +#endif /* CONFIG_WPS_OOB */ +#ifdef CONFIG_WPS_NFC + static int wpa_supplicant_ctrl_iface_wps_nfc(struct wpa_supplicant *wpa_s, char *cmd) { @@ -689,7 +692,8 @@ static int wpa_supplicant_ctrl_iface_wps_nfc_tag_read( return ret; } -#endif /* CONFIG_WPS_OOB */ + +#endif /* CONFIG_WPS_NFC */ static int wpa_supplicant_ctrl_iface_wps_reg(struct wpa_supplicant *wpa_s, @@ -4118,6 +4122,8 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, } else if (os_strncmp(buf, "WPS_OOB ", 8) == 0) { if (wpa_supplicant_ctrl_iface_wps_oob(wpa_s, buf + 8)) reply_len = -1; +#endif /* CONFIG_WPS_OOB */ +#ifdef CONFIG_WPS_NFC } else if (os_strcmp(buf, "WPS_NFC") == 0) { if (wpa_supplicant_ctrl_iface_wps_nfc(wpa_s, NULL)) reply_len = -1; @@ -4131,7 +4137,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, if (wpa_supplicant_ctrl_iface_wps_nfc_tag_read(wpa_s, buf + 17)) reply_len = -1; -#endif /* CONFIG_WPS_OOB */ +#endif /* CONFIG_WPS_NFC */ } else if (os_strncmp(buf, "WPS_REG ", 8) == 0) { if (wpa_supplicant_ctrl_iface_wps_reg(wpa_s, buf + 8)) reply_len = -1; diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index 4d2d31322..17d1abe9b 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -845,8 +845,11 @@ static int wpa_cli_cmd_wps_oob(struct wpa_ctrl *ctrl, int argc, char *argv[]) } return wpa_ctrl_command(ctrl, cmd); } +#endif /* CONFIG_WPS_OOB */ +#ifdef CONFIG_WPS_NFC + static int wpa_cli_cmd_wps_nfc(struct wpa_ctrl *ctrl, int argc, char *argv[]) { char cmd[256]; @@ -913,7 +916,8 @@ static int wpa_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc, return ret; } -#endif /* CONFIG_WPS_OOB */ + +#endif /* CONFIG_WPS_NFC */ static int wpa_cli_cmd_wps_reg(struct wpa_ctrl *ctrl, int argc, char *argv[]) @@ -3109,6 +3113,8 @@ static struct wpa_cli_cmd wpa_cli_commands[] = { { "wps_oob", wpa_cli_cmd_wps_oob, cli_cmd_flag_sensitive, " [DEV_NAME] = start WPS OOB" }, +#endif /* CONFIG_WPS_OOB */ +#ifdef CONFIG_WPS_NFC { "wps_nfc", wpa_cli_cmd_wps_nfc, cli_cmd_flag_none, "[BSSID] = start Wi-Fi Protected Setup: NFC" }, @@ -3118,7 +3124,7 @@ static struct wpa_cli_cmd wpa_cli_commands[] = { { "wps_nfc_tag_read", wpa_cli_cmd_wps_nfc_tag_read, cli_cmd_flag_sensitive, " = report read NFC tag with WPS data" }, -#endif /* CONFIG_WPS_OOB */ +#endif /* CONFIG_WPS_NFC */ { "wps_reg", wpa_cli_cmd_wps_reg, cli_cmd_flag_sensitive, " = start WPS Registrar to configure an AP" },