aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-06-28 14:05:13 +0300
committerJouni Malinen <j@w1.fi>2012-06-28 14:07:22 +0300
commit71892384da8fbed65dc4bf88e44e27b4ed60d6eb (patch)
tree260dec736a75230faf4d2b4fe38c42f2332443ca
parentd7645d239de0fbdd88e89b1cd849e993ab4d3464 (diff)
downloadexternal_wpa_supplicant_8_ti-71892384da8fbed65dc4bf88e44e27b4ed60d6eb.zip
external_wpa_supplicant_8_ti-71892384da8fbed65dc4bf88e44e27b4ed60d6eb.tar.gz
external_wpa_supplicant_8_ti-71892384da8fbed65dc4bf88e44e27b4ed60d6eb.tar.bz2
WPS: Fix ifdef use for the new NFC mechanism in wpa_supplicant
Use CONFIG_WPS_NFC instead of CONFIG_WPS_OOB for the NFC specific new ctrl_iface commands. Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r--wpa_supplicant/ctrl_iface.c10
-rw-r--r--wpa_supplicant/wpa_cli.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 4a8478c..d4b32e3 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -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;
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 4d2d313..17d1abe 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -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" },