]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Fix ifdef use for the new NFC mechanism in wpa_supplicant
authorJouni Malinen <j@w1.fi>
Thu, 28 Jun 2012 11:05:13 +0000 (14:05 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 28 Jun 2012 11:07:22 +0000 (14:07 +0300)
Use CONFIG_WPS_NFC instead of CONFIG_WPS_OOB for the NFC specific
new ctrl_iface commands.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/ctrl_iface.c
wpa_supplicant/wpa_cli.c

index 4a8478c5372df38723e7806acc792563dcaf2965..d4b32e338514e0cd1ea9964c3ead9882ec306860 100644 (file)
@@ -619,7 +619,10 @@ 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;
index 4d2d31322eb948079a190dd25a2b3432f04f10b3..17d1abe9bc60c5a4775e973929684994f23b6a21 100644 (file)
@@ -845,7 +845,10 @@ 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[])
 {
@@ -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_TYPE> <PATH> <METHOD> [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,
          "<hexdump of payload> = 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,
          "<BSSID> <AP PIN> = start WPS Registrar to configure an AP" },