aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-11-29 10:19:30 (GMT)
committerJouni Malinen <j@w1.fi>2008-11-29 10:19:30 (GMT)
commit7d7c918d9725b7622e50084459f3f382f50618ac (patch)
treea9c4836f0a24421a9c7f497f4e6203e3b9f2f3a3 /src/wps
parenteb76b7e3ffea75035836aa2313c3c69b60c2ac34 (diff)
downloadhostap-06-7d7c918d9725b7622e50084459f3f382f50618ac.zip
hostap-06-7d7c918d9725b7622e50084459f3f382f50618ac.tar.gz
hostap-06-7d7c918d9725b7622e50084459f3f382f50618ac.tar.bz2
WPS: Pass device data into wps_enrollee_build_probe_req_ie()
Use configured device data instead of hardcoded values to generate WPS IE for Probe Request.
Diffstat (limited to 'src/wps')
-rw-r--r--src/wps/wps.h4
-rw-r--r--src/wps/wps_enrollee.c13
2 files changed, 7 insertions, 10 deletions
diff --git a/src/wps/wps.h b/src/wps/wps.h
index e206c2d..9807caa 100644
--- a/src/wps/wps.h
+++ b/src/wps/wps.h
@@ -131,6 +131,8 @@ void wps_registrar_probe_req_rx(struct wps_registrar *reg, const u8 *addr,
const struct wpabuf *wps_data);
struct wpabuf * wps_enrollee_build_assoc_req_ie(void);
-struct wpabuf * wps_enrollee_build_probe_req_ie(int pbc, const u8 *uuid);
+struct wpabuf * wps_enrollee_build_probe_req_ie(int pbc,
+ struct wps_device_data *dev,
+ const u8 *uuid);
#endif /* WPS_H */
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index 4a0058a..f16a05b 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -1147,21 +1147,16 @@ struct wpabuf * wps_enrollee_build_assoc_req_ie(void)
}
-struct wpabuf * wps_enrollee_build_probe_req_ie(int pbc, const u8 *uuid)
+struct wpabuf * wps_enrollee_build_probe_req_ie(int pbc,
+ struct wps_device_data *dev,
+ const u8 *uuid)
{
struct wpabuf *ie;
u8 *len;
u16 methods;
- struct wps_device_data dev;
wpa_printf(MSG_DEBUG, "WPS: Building WPS IE for Probe Request");
- /* TODO: get device data from caller */
- os_memset(&dev, 0, sizeof(dev));
- dev.categ = WPS_DEV_COMPUTER;
- dev.oui = WPS_DEV_OUI_WFA;
- dev.sub_categ = WPS_DEV_COMPUTER_PC;
-
ie = wpabuf_alloc(200);
if (ie == NULL)
return NULL;
@@ -1180,7 +1175,7 @@ struct wpabuf * wps_enrollee_build_probe_req_ie(int pbc, const u8 *uuid)
wps_build_req_type(ie, WPS_REQ_ENROLLEE) ||
wps_build_config_methods(ie, methods) ||
wps_build_uuid_e(ie, uuid) ||
- wps_build_primary_dev_type(&dev, ie) ||
+ wps_build_primary_dev_type(dev, ie) ||
wps_build_rf_bands(NULL, ie) ||
wps_build_assoc_state(NULL, ie) ||
wps_build_config_error(NULL, ie) ||