]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Set LCI and Location Civic information in configuration
authorDavid Spinadel <david.spinadel@intel.com>
Wed, 6 Apr 2016 16:42:01 +0000 (19:42 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 9 Apr 2016 08:18:55 +0000 (11:18 +0300)
Enable configuration of LCI and location civic information in
hostapd.conf.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.c
src/ap/ap_config.h

index c35d5aecbae3f55cd45036c8b9bf9a80996e3ed0..9e17388e6f72b0dfd80563140f77165b8afe2439 100644 (file)
@@ -1920,7 +1920,6 @@ static int hs20_parse_osu_service_desc(struct hostapd_bss_config *bss,
 #endif /* CONFIG_HS20 */
 
 
-#ifdef CONFIG_WPS_NFC
 static struct wpabuf * hostapd_parse_bin(const char *buf)
 {
        size_t len;
@@ -1942,7 +1941,6 @@ static struct wpabuf * hostapd_parse_bin(const char *buf)
 
        return ret;
 }
-#endif /* CONFIG_WPS_NFC */
 
 
 #ifdef CONFIG_ACS
@@ -3487,6 +3485,12 @@ static int hostapd_config_fill(struct hostapd_config *conf,
        } else if (os_strcmp(buf, "no_auth_if_seen_on") == 0) {
                os_free(bss->no_auth_if_seen_on);
                bss->no_auth_if_seen_on = os_strdup(pos);
+       } else if (os_strcmp(buf, "lci") == 0) {
+               wpabuf_free(conf->lci);
+               conf->lci = hostapd_parse_bin(pos);
+       } else if (os_strcmp(buf, "civic") == 0) {
+               wpabuf_free(conf->civic);
+               conf->civic = hostapd_parse_bin(pos);
        } else {
                wpa_printf(MSG_ERROR,
                           "Line %d: unknown configuration item '%s'",
index d943a43d13a8b42769bc157c96f989d65a49ed7c..dd7b46630abe98f15ac88351fdfde1b8df71485f 100644 (file)
@@ -1879,6 +1879,14 @@ own_ip_addr=127.0.0.1
 # Transitioning between states).
 #fst_llt=100
 
+##### Radio measurements / location ###########################################
+
+# The content of a LCI measurement subelement
+#lci=<Hexdump of binary data of the LCI report>
+
+# The content of a location civic measurement subelement
+#civic=<Hexdump of binary data of the location civic report>
+
 ##### TESTING OPTIONS #########################################################
 #
 # The options in this section are only available when the build configuration
index 66b843ca0f4d617e67fd772cb0efb034cd12a636..e7d7bb92c8ea92d1b677689d5b9ba288274f15b8 100644 (file)
@@ -606,6 +606,8 @@ void hostapd_config_free(struct hostapd_config *conf)
 #ifdef CONFIG_ACS
        os_free(conf->acs_chan_bias);
 #endif /* CONFIG_ACS */
+       wpabuf_free(conf->lci);
+       wpabuf_free(conf->civic);
 
        os_free(conf);
 }
index 2d07c67b38c991f204e90c37b5fb652128b1df50..a78d0b25b3aa67f2bfc87f3a0b0f597427e70810 100644 (file)
@@ -693,6 +693,9 @@ struct hostapd_config {
        } *acs_chan_bias;
        unsigned int num_acs_chan_bias;
 #endif /* CONFIG_ACS */
+
+       struct wpabuf *lci;
+       struct wpabuf *civic;
 };