[PATCH 04/10] P2PS: Save wps_prov_info on the responder side
Ilan Peer
ilan.peer
Thu Jul 2 00:45:02 PDT 2015
From: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
When device A sends PD response to device B, device A should save
wps_prov_info for device B. Not doing so would result in a redundant and
incorrect PD flow, e.g. when upon PROV-DISC-DONE event device
B starts a GO and device A should join it.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
Reviewed-by: Ilan Peer <ilan.peer at intel.com>
---
src/p2p/p2p_pd.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 066029a..c47abcc 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -786,6 +786,26 @@ out:
msg.capability ? msg.capability[1] :
0,
msg.group_id, msg.group_id_len);
+
+ if (dev) {
+ switch (config_methods) {
+ case WPS_CONFIG_DISPLAY:
+ dev->wps_prov_info = WPS_CONFIG_KEYPAD;
+ break;
+ case WPS_CONFIG_KEYPAD:
+ dev->wps_prov_info = WPS_CONFIG_DISPLAY;
+ break;
+ case WPS_CONFIG_PUSHBUTTON:
+ dev->wps_prov_info = WPS_CONFIG_PUSHBUTTON;
+ break;
+ case WPS_CONFIG_P2PS:
+ dev->wps_prov_info = WPS_CONFIG_P2PS;
+ break;
+ default:
+ dev->wps_prov_info = 0;
+ break;
+ }
+ }
}
p2p_parse_free(&msg);
}
--
1.9.1
More information about the Hostap
mailing list