aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-08-03 14:53:21 (GMT)
committerJouni Malinen <j@w1.fi>2016-09-05 18:27:23 (GMT)
commitd1723c5566d0b582cf4309e725e22970fa1ce0a1 (patch)
tree6b22bc6f9c4aabe75890a10867766b0a8a3f3187 /wpa_supplicant/wpa_supplicant.c
parentfaecb39236f79f2b3f23d20d85b0353c6541f580 (diff)
downloadhostap-d1723c5566d0b582cf4309e725e22970fa1ce0a1.zip
hostap-d1723c5566d0b582cf4309e725e22970fa1ce0a1.tar.gz
hostap-d1723c5566d0b582cf4309e725e22970fa1ce0a1.tar.bz2
wpa_supplicant: Allow FTM functionality to be published
Add configuration options that control publishing of fine timing measurement (FTM) responder and initiator functionality via bits 70, 71 of Extended Capabilities element. Typically, FTM functionality is controlled by a location framework outside wpa_supplicant. When framework is activated, it will use wpa_supplicant to configure the STA/AP to publish the FTM functionality. See IEEE P802.11-REVmc/D7.0, 9.4.2.27. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 5bb1f72..0785576 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1456,6 +1456,14 @@ static void wpas_ext_capab_byte(struct wpa_supplicant *wpa_s, u8 *pos, int idx)
break;
case 6: /* Bits 48-55 */
break;
+ case 7: /* Bits 56-63 */
+ break;
+ case 8: /* Bits 64-71 */
+ if (wpa_s->conf->ftm_responder)
+ *pos |= 0x40; /* Bit 70 - FTM responder */
+ if (wpa_s->conf->ftm_initiator)
+ *pos |= 0x80; /* Bit 71 - FTM initiator */
+ break;
}
}
@@ -1465,6 +1473,9 @@ int wpas_build_ext_capab(struct wpa_supplicant *wpa_s, u8 *buf, size_t buflen)
u8 *pos = buf;
u8 len = 6, i;
+ if (len < 9 &&
+ (wpa_s->conf->ftm_initiator || wpa_s->conf->ftm_responder))
+ len = 9;
if (len < wpa_s->extended_capa_len)
len = wpa_s->extended_capa_len;
if (buflen < (size_t) len + 2) {