]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Configure FTM responder parameters
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Mon, 3 Dec 2018 17:06:21 +0000 (19:06 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 21 Dec 2018 09:19:25 +0000 (11:19 +0200)
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@intel.com>
src/ap/beacon.c

index 03cec3ece0bb2293ef713eec9539e8db32709d80..19d0bcd2a7677a491e945dcbafa1de6fa7806cc5 100644 (file)
@@ -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 support for it");
+               }
+       }
+
        return 0;
 }