aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-10-17 21:24:16 (GMT)
committerJouni Malinen <j@w1.fi>2011-10-17 21:24:16 (GMT)
commit39b97072b2a45551e6f20e6251eeaca269f22a2d (patch)
treec48adab1555d67a90d93cee938528065447fe82e /hostapd
parent96b2cb226a79a6e9ce565b0939ee76a26e497717 (diff)
downloadhostap-39b97072b2a45551e6f20e6251eeaca269f22a2d.zip
hostap-39b97072b2a45551e6f20e6251eeaca269f22a2d.tar.gz
hostap-39b97072b2a45551e6f20e6251eeaca269f22a2d.tar.bz2
Add support for Time Advertisement
This adds preliminary support for IEEE 802.11v Time Advertisement mechanism with UTC TSF offset.
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/config_file.c14
-rw-r--r--hostapd/hostapd.conf11
2 files changed, 25 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index b84545d..1bfd456 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2092,6 +2092,20 @@ struct hostapd_config * hostapd_config_read(const char *fname)
extern int rsn_testing;
rsn_testing = atoi(pos);
#endif /* CONFIG_RSN_TESTING */
+ } else if (os_strcmp(buf, "time_advertisement") == 0) {
+ bss->time_advertisement = atoi(pos);
+ } else if (os_strcmp(buf, "time_zone") == 0) {
+ size_t tz_len = os_strlen(pos);
+ if (tz_len < 4 || tz_len > 255) {
+ wpa_printf(MSG_DEBUG, "Line %d: invalid "
+ "time_zone", line);
+ errors++;
+ continue;
+ }
+ os_free(bss->time_zone);
+ bss->time_zone = os_strdup(pos);
+ if (bss->time_zone == NULL)
+ errors++;
#ifdef CONFIG_INTERWORKING
} else if (os_strcmp(buf, "interworking") == 0) {
bss->interworking = atoi(pos);
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index d5ab422..a2e50bf 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -1023,6 +1023,17 @@ own_ip_addr=127.0.0.1
# Prohibit use of TDLS Channel Switching in this BSS
#tdls_prohibit_chan_switch=1
+##### IEEE 802.11v-2011 #######################################################
+
+# Time advertisement
+# 0 = disabled (default)
+# 2 = UTC time at which the TSF timer is 0
+#time_advertisement=2
+
+# Local time zone as specified in 8.3 of IEEE Std 1003.1-2004:
+# stdoffset[dst[offset][,start[/time],end[/time]]]
+#time_zone=EST5
+
##### IEEE 802.11u-2011 #######################################################
# Enable Interworking service