[PATCH 2/3] AP: Configure FTM responder parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Enable FTM responder and configure LCI and civic if ftm_responder
configuration option is set.
Since ftm_responder configuration existed before and was used to set
extended capability bits, don't fail AP setup flow if ftm_responder is
set, but the driver doesn't advertise FTM responder support.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@xxxxxxxxx>
---
 src/ap/beacon.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/ap/beacon.c b/src/ap/beacon.c
index 59bd4af395..ef30bbec47 100644
--- a/src/ap/beacon.c
+++ b/src/ap/beacon.c
@@ -1357,6 +1357,18 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
 #endif /* CONFIG_HS20 */
 	params->multicast_to_unicast = hapd->conf->multicast_to_unicast;
 	params->pbss = hapd->conf->pbss;
+
+	if (hapd->conf->ftm_responder) {
+		if (hapd->iface->drv_flags & WPA_DRIVER_FLAGS_FTM_RESPONDER) {
+			params->ftm_responder = 1;
+			params->lci = hapd->iface->conf->lci;
+			params->civic = hapd->iface->conf->civic;
+		} else {
+			wpa_printf(MSG_WARNING,
+				   "Not configuring FTM responder as the driver doesn't advertise its support");
+		}
+	}
+
 	return 0;
 }
 
-- 
2.19.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux