aboutsummaryrefslogtreecommitdiffstats
path: root/src/wps/wps_dev_attr.c
diff options
context:
space:
mode:
authorAnirban Sirkhell <anirban@qca.qualcomm.com>2012-04-04 00:08:57 +0300
committerJouni Malinen <j@w1.fi>2012-04-04 00:08:57 +0300
commit71dd3b78f90a5ca4d5f56966df024c676af177be (patch)
tree2fc4104d83c6ce9f428633dfaa515dc1d88548a7 /src/wps/wps_dev_attr.c
parent2e9f078c8dde5abfe7025513deb417c679502e99 (diff)
downloadexternal_wpa_supplicant_8_ti-71dd3b78f90a5ca4d5f56966df024c676af177be.zip
external_wpa_supplicant_8_ti-71dd3b78f90a5ca4d5f56966df024c676af177be.tar.gz
external_wpa_supplicant_8_ti-71dd3b78f90a5ca4d5f56966df024c676af177be.tar.bz2
WPS: Allow vendor specific attribute to be added into M1
wps_vendor_ext_m1 configuration parameter can now be used to add a vendor specific attribute into the WPS M1 message, e.g., for Windows Vertical Pairing. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/wps/wps_dev_attr.c')
-rw-r--r--src/wps/wps_dev_attr.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wps/wps_dev_attr.c b/src/wps/wps_dev_attr.c
index 559582d..3c94a43 100644
--- a/src/wps/wps_dev_attr.c
+++ b/src/wps/wps_dev_attr.c
@@ -203,6 +203,20 @@ int wps_build_os_version(struct wps_device_data *dev, struct wpabuf *msg)
}
+int wps_build_vendor_ext_m1(struct wps_device_data *dev, struct wpabuf *msg)
+{
+ if (dev->vendor_ext_m1 != NULL) {
+ wpa_hexdump(MSG_DEBUG, "WPS: * Vendor Extension M1",
+ wpabuf_head_u8(dev->vendor_ext_m1),
+ wpabuf_len(dev->vendor_ext_m1));
+ wpabuf_put_be16(msg, ATTR_VENDOR_EXT);
+ wpabuf_put_be16(msg, wpabuf_len(dev->vendor_ext_m1));
+ wpabuf_put_buf(msg, dev->vendor_ext_m1);
+ }
+ return 0;
+}
+
+
int wps_build_rf_bands(struct wps_device_data *dev, struct wpabuf *msg)
{
wpa_printf(MSG_DEBUG, "WPS: * RF Bands (%x)", dev->rf_bands);