diff options
author | Bharat Chakravarty <bchakrav@qca.qualcomm.com> | 2011-09-01 15:24:45 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-09-01 15:24:45 +0300 |
commit | a9355fac5fe76b48d11bc57787f12d74370ed64a (patch) | |
tree | bfd1b97993261cfc2de2454f2c610554d4fc673e /src/wps | |
parent | 6fb6d842bba34ce9579ca2f5f9406e00254030f2 (diff) | |
download | external_wpa_supplicant_8_ti-a9355fac5fe76b48d11bc57787f12d74370ed64a.zip external_wpa_supplicant_8_ti-a9355fac5fe76b48d11bc57787f12d74370ed64a.tar.gz external_wpa_supplicant_8_ti-a9355fac5fe76b48d11bc57787f12d74370ed64a.tar.bz2 |
WPS: Set Probe Request config methods based on configuration
Instead of hardcoding the Config Methods attribute value in Probe
Request frames, set this based on the configured parameter
config_methods to allow correct set of methods to be advertised.
Diffstat (limited to 'src/wps')
-rw-r--r-- | src/wps/wps.c | 29 | ||||
-rw-r--r-- | src/wps/wps.h | 1 |
2 files changed, 2 insertions, 28 deletions
diff --git a/src/wps/wps.c b/src/wps/wps.c index 101ae1d..9413ece 100644 --- a/src/wps/wps.c +++ b/src/wps/wps.c @@ -456,7 +456,6 @@ struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev, const u8 *req_dev_types) { struct wpabuf *ie; - u16 methods = 0; wpa_printf(MSG_DEBUG, "WPS: Building WPS IE for Probe Request"); @@ -464,35 +463,9 @@ struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev, if (ie == NULL) return NULL; - methods |= WPS_CONFIG_PUSHBUTTON; -#ifdef CONFIG_WPS2 - /* - * TODO: Should figure out whether this device has a physical or - * virtual pushbutton. - */ - methods |= WPS_CONFIG_VIRT_PUSHBUTTON; -#endif /* CONFIG_WPS2 */ - - /* - * TODO: Should figure out whether this Probe Request was triggered - * using physical or virtual display. Also, if the device has a PIN on - * a label, that should be indicated here. - */ - methods |= WPS_CONFIG_DISPLAY | -#ifdef CONFIG_WPS2 - WPS_CONFIG_VIRT_DISPLAY | -#endif /* CONFIG_WPS2 */ - WPS_CONFIG_KEYPAD; -#ifdef CONFIG_WPS_UFD - methods |= WPS_CONFIG_USBA; -#endif /* CONFIG_WPS_UFD */ -#ifdef CONFIG_WPS_NFC - methods |= WPS_CONFIG_NFC_INTERFACE; -#endif /* CONFIG_WPS_NFC */ - if (wps_build_version(ie) || wps_build_req_type(ie, req_type) || - wps_build_config_methods(ie, methods) || + wps_build_config_methods(ie, dev->config_methods) || wps_build_uuid_e(ie, uuid) || wps_build_primary_dev_type(dev, ie) || wps_build_rf_bands(dev, ie) || diff --git a/src/wps/wps.h b/src/wps/wps.h index 2cbbc18..e2cd4a7 100644 --- a/src/wps/wps.h +++ b/src/wps/wps.h @@ -99,6 +99,7 @@ struct wps_device_data { u8 num_sec_dev_types; u32 os_version; u8 rf_bands; + u16 config_methods; struct wpabuf *vendor_ext[MAX_WPS_VENDOR_EXTENSIONS]; int p2p; |