aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-08-03 14:41:53 (GMT)
committerJouni Malinen <j@w1.fi>2016-09-05 18:23:07 (GMT)
commitfaecb39236f79f2b3f23d20d85b0353c6541f580 (patch)
tree5570a322e49be0b489366e1bba47e7499616228f /src
parentff229935943cda3718e57fd11e4ef83f9e64d6d2 (diff)
downloadhostap-faecb39236f79f2b3f23d20d85b0353c6541f580.zip
hostap-faecb39236f79f2b3f23d20d85b0353c6541f580.tar.gz
hostap-faecb39236f79f2b3f23d20d85b0353c6541f580.tar.bz2
hostapd: 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 hostapd. When framework is activated, it will use hostapd to configure the 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 'src')
-rw-r--r--src/ap/ap_config.h3
-rw-r--r--src/ap/ieee802_11_shared.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index b16286b..8c8f7e2 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -592,6 +592,9 @@ struct hostapd_bss_config {
#ifdef CONFIG_MBO
int mbo_enabled;
#endif /* CONFIG_MBO */
+
+ int ftm_responder;
+ int ftm_initiator;
};
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index af858f0..259413b 100644
--- a/src/ap/ieee802_11_shared.c
+++ b/src/ap/ieee802_11_shared.c
@@ -218,6 +218,12 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx)
if (hapd->conf->ssid.utf8_ssid)
*pos |= 0x01; /* Bit 48 - UTF-8 SSID */
break;
+ case 8: /* Bits 64-71 */
+ if (hapd->conf->ftm_responder)
+ *pos |= 0x40; /* Bit 70 - FTM responder */
+ if (hapd->conf->ftm_initiator)
+ *pos |= 0x80; /* Bit 71 - FTM initiator */
+ break;
}
}
@@ -237,6 +243,9 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid)
len = 1;
if (len < 7 && hapd->conf->ssid.utf8_ssid)
len = 7;
+ if (len < 9 &&
+ (hapd->conf->ftm_initiator || hapd->conf->ftm_responder))
+ len = 9;
#ifdef CONFIG_WNM
if (len < 4)
len = 4;