aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-02-20 16:45:58 +0200
committerHamad Kadmany <hkadmany@codeaurora.org>2016-04-15 01:48:50 +0300
commitca4a3cbee6e15cde469b171c2a9520a7389d13d3 (patch)
tree822c0706bd8307b91e66f5390a617f445ad2abfe /src
parentfd3fc234c3c3cf9798805ae3441beb9234253797 (diff)
downloadandroid_external_wpa_supplicant_8-ca4a3cbee6e15cde469b171c2a9520a7389d13d3.tar.gz
android_external_wpa_supplicant_8-ca4a3cbee6e15cde469b171c2a9520a7389d13d3.tar.bz2
android_external_wpa_supplicant_8-ca4a3cbee6e15cde469b171c2a9520a7389d13d3.zip
P2P: Add Dev Info attribute to Probe Request frames in 60 GHz
When building P2P IE for Probe Request frames in P2P scan, add the device information attribute if the 60 GHz band is included in the scan, since this is required by the P2P specification. Change-Id: Ib4439786cc1297859234e0b0661e7c1b5576c896 Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Git-commit: c58eed6dc72f3169154d94cd258cdcbdcd24913a Git-repo: git://w1.fi/srv/git/hostap.git CRs-Fixed: 985990
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p.c7
-rw-r--r--src/p2p/p2p.h4
2 files changed, 9 insertions, 2 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index fb4c0aec..5da8ab38 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -10,6 +10,7 @@
#include "common.h"
#include "eloop.h"
+#include "common/defs.h"
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
#include "common/wpa_ctrl.h"
@@ -3433,7 +3434,8 @@ void p2p_scan_res_handled(struct p2p_data *p2p)
}
-void p2p_scan_ie(struct p2p_data *p2p, struct wpabuf *ies, const u8 *dev_id)
+void p2p_scan_ie(struct p2p_data *p2p, struct wpabuf *ies, const u8 *dev_id,
+ unsigned int bands)
{
u8 dev_capab;
u8 *len;
@@ -3467,6 +3469,9 @@ void p2p_scan_ie(struct p2p_data *p2p, struct wpabuf *ies, const u8 *dev_id)
p2p_buf_add_ext_listen_timing(ies, p2p->ext_listen_period,
p2p->ext_listen_interval);
+ if (bands & BAND_60_GHZ)
+ p2p_buf_add_device_info(ies, p2p, NULL);
+
if (p2p->p2ps_seek && p2p->p2ps_seek_count)
p2p_buf_add_service_hash(ies, p2p);
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index 9fa4aabf..9f26d7c2 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -1837,8 +1837,10 @@ int p2p_assoc_req_ie(struct p2p_data *p2p, const u8 *bssid, u8 *buf,
* @p2p: P2P module context from p2p_init()
* @ies: Buffer for writing P2P IE
* @dev_id: Device ID to search for or %NULL for any
+ * @bands: Frequency bands used in the scan (enum wpa_radio_work_band bitmap)
*/
-void p2p_scan_ie(struct p2p_data *p2p, struct wpabuf *ies, const u8 *dev_id);
+void p2p_scan_ie(struct p2p_data *p2p, struct wpabuf *ies, const u8 *dev_id,
+ unsigned int bands);
/**
* p2p_scan_ie_buf_len - Get maximum buffer length needed for p2p_scan_ie