aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorBrian Gix <bgix@qce.qualcomm.com>2014-09-11 15:27:44 (GMT)
committerJouni Malinen <j@w1.fi>2015-02-02 14:55:45 (GMT)
commit4f88fc0464ad457867fef27f424e2517e3cedce9 (patch)
tree980e91772a11fb7fea06dafb72615c006796d613 /src/wps
parent1a94b0adccf4cd6f63ff3c3a65ae28c68c229df6 (diff)
downloadhostap-4f88fc0464ad457867fef27f424e2517e3cedce9.zip
hostap-4f88fc0464ad457867fef27f424e2517e3cedce9.tar.gz
hostap-4f88fc0464ad457867fef27f424e2517e3cedce9.tar.bz2
P2PS: WPS changes needed for P2PS default PIN
This provides additional WPS definitions and rules for negotiating use of P2PS default PIN configuration method. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps_common.c5
-rw-r--r--src/wps/wps_defs.h4
-rw-r--r--src/wps/wps_registrar.c1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/wps/wps_common.c b/src/wps/wps_common.c
index 222d485..c1ede6a 100644
--- a/src/wps/wps_common.c
+++ b/src/wps/wps_common.c
@@ -535,6 +535,9 @@ u16 wps_config_methods_str2bin(const char *str)
#ifdef CONFIG_WPS_NFC
methods |= WPS_CONFIG_NFC_INTERFACE;
#endif /* CONFIG_WPS_NFC */
+#ifdef CONFIG_P2P
+ methods |= WPS_CONFIG_P2PS;
+#endif /* CONFIG_P2P */
} else {
if (os_strstr(str, "ethernet"))
methods |= WPS_CONFIG_ETHERNET;
@@ -560,6 +563,8 @@ u16 wps_config_methods_str2bin(const char *str)
methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
if (os_strstr(str, "physical_push_button"))
methods |= WPS_CONFIG_PHY_PUSHBUTTON;
+ if (os_strstr(str, "p2ps"))
+ methods |= WPS_CONFIG_P2PS;
}
return methods;
diff --git a/src/wps/wps_defs.h b/src/wps/wps_defs.h
index da005a4..25cd14a 100644
--- a/src/wps/wps_defs.h
+++ b/src/wps/wps_defs.h
@@ -154,7 +154,8 @@ enum wps_dev_password_id {
DEV_PW_REKEY = 0x0003,
DEV_PW_PUSHBUTTON = 0x0004,
DEV_PW_REGISTRAR_SPECIFIED = 0x0005,
- DEV_PW_NFC_CONNECTION_HANDOVER = 0x0007
+ DEV_PW_NFC_CONNECTION_HANDOVER = 0x0007,
+ DEV_PW_P2PS_DEFAULT = 0x0008
};
/* Message Type */
@@ -244,6 +245,7 @@ enum wps_error_indication {
#define WPS_CONFIG_KEYPAD 0x0100
#define WPS_CONFIG_VIRT_PUSHBUTTON 0x0280
#define WPS_CONFIG_PHY_PUSHBUTTON 0x0480
+#define WPS_CONFIG_P2PS 0x1000
#define WPS_CONFIG_VIRT_DISPLAY 0x2008
#define WPS_CONFIG_PHY_DISPLAY 0x4008
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index 8ee1ea9..48b7e12 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -2578,6 +2578,7 @@ static enum wps_process_res wps_process_m1(struct wps_data *wps,
if (wps->dev_pw_id < 0x10 &&
wps->dev_pw_id != DEV_PW_DEFAULT &&
+ wps->dev_pw_id != DEV_PW_P2PS_DEFAULT &&
wps->dev_pw_id != DEV_PW_USER_SPECIFIED &&
wps->dev_pw_id != DEV_PW_MACHINE_SPECIFIED &&
wps->dev_pw_id != DEV_PW_REGISTRAR_SPECIFIED &&