aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-02-20 14:45:58 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-03 13:13:56 (GMT)
commitc58eed6dc72f3169154d94cd258cdcbdcd24913a (patch)
tree164623b809cd29cfe58baa0c6cd0c239d5b82a09 /wpa_supplicant/p2p_supplicant.c
parent2b6e9f91df7acf19998f967fcc6c5f4bb911d1d8 (diff)
downloadhostap-c58eed6dc72f3169154d94cd258cdcbdcd24913a.zip
hostap-c58eed6dc72f3169154d94cd258cdcbdcd24913a.tar.gz
hostap-c58eed6dc72f3169154d94cd258cdcbdcd24913a.tar.bz2
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. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 19c7c75..3e31f41 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -351,6 +351,7 @@ static int wpas_p2p_scan(void *ctx, enum p2p_scan_type type, int freq,
int social_channels_freq[] = { 2412, 2437, 2462, 60480 };
size_t ielen;
u8 *n, i;
+ unsigned int bands;
if (wpa_s->global->p2p_disabled || wpa_s->global->p2p == NULL)
return -1;
@@ -429,7 +430,8 @@ static int wpas_p2p_scan(void *ctx, enum p2p_scan_type type, int freq,
wpabuf_put_buf(ies, wps_ie);
wpabuf_free(wps_ie);
- p2p_scan_ie(wpa_s->global->p2p, ies, dev_id);
+ bands = wpas_get_bands(wpa_s, params->freqs);
+ p2p_scan_ie(wpa_s->global->p2p, ies, dev_id, bands);
params->p2p_probe = 1;
n = os_malloc(wpabuf_len(ies));
@@ -4930,6 +4932,7 @@ static void wpas_p2p_join_scan_req(struct wpa_supplicant *wpa_s, int freq,
struct wpabuf *wps_ie, *ies;
size_t ielen;
int freqs[2] = { 0, 0 };
+ unsigned int bands;
os_memset(&params, 0, sizeof(params));
@@ -4981,7 +4984,8 @@ static void wpas_p2p_join_scan_req(struct wpa_supplicant *wpa_s, int freq,
wpabuf_put_buf(ies, wps_ie);
wpabuf_free(wps_ie);
- p2p_scan_ie(wpa_s->global->p2p, ies, NULL);
+ bands = wpas_get_bands(wpa_s, freqs);
+ p2p_scan_ie(wpa_s->global->p2p, ies, NULL, bands);
params.p2p_probe = 1;
params.extra_ies = wpabuf_head(ies);
@@ -6713,12 +6717,15 @@ void wpas_p2p_rx_action(struct wpa_supplicant *wpa_s, const u8 *da,
void wpas_p2p_scan_ie(struct wpa_supplicant *wpa_s, struct wpabuf *ies)
{
+ unsigned int bands;
+
if (wpa_s->global->p2p_disabled)
return;
if (wpa_s->global->p2p == NULL)
return;
- p2p_scan_ie(wpa_s->global->p2p, ies, NULL);
+ bands = wpas_get_bands(wpa_s, NULL);
+ p2p_scan_ie(wpa_s->global->p2p, ies, NULL, bands);
}