FST: hostapd configuration parameters
authorAnton Nayshtut <qca_antonn@qca.qualcomm.com>
Wed, 21 Jan 2015 13:30:48 +0000 (15:30 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 16 Jul 2015 15:26:15 +0000 (18:26 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h

index 49f8320..795fc37 100644 (file)
@@ -3309,6 +3309,64 @@ static int hostapd_config_fill(struct hostapd_config *conf,
        } else if (os_strcmp(buf, "wowlan_triggers") == 0) {
                os_free(bss->wowlan_triggers);
                bss->wowlan_triggers = os_strdup(pos);
+#ifdef CONFIG_FST
+       } else if (os_strcmp(buf, "fst_group_id") == 0) {
+               size_t len = os_strlen(pos);
+
+               if (!len || len >= sizeof(conf->fst_cfg.group_id)) {
+                       wpa_printf(MSG_ERROR,
+                                  "Line %d: Invalid fst_group_id value '%s'",
+                                  line, pos);
+                       return 1;
+               }
+
+               if (conf->fst_cfg.group_id[0]) {
+                       wpa_printf(MSG_ERROR,
+                                  "Line %d: Duplicate fst_group value '%s'",
+                                  line, pos);
+                       return 1;
+               }
+
+               os_strlcpy(conf->fst_cfg.group_id, pos,
+                          sizeof(conf->fst_cfg.group_id));
+       } else if (os_strcmp(buf, "fst_priority") == 0) {
+               char *endp;
+               long int val;
+
+               if (!*pos) {
+                       wpa_printf(MSG_ERROR,
+                                  "Line %d: fst_priority value not supplied (expected 1..%u)",
+                                  line, FST_MAX_PRIO_VALUE);
+                       return -1;
+               }
+
+               val = strtol(pos, &endp, 0);
+               if (*endp || val < 1 || val > FST_MAX_PRIO_VALUE) {
+                       wpa_printf(MSG_ERROR,
+                                  "Line %d: Invalid fst_priority %ld (%s) (expected 1..%u)",
+                                  line, val, pos, FST_MAX_PRIO_VALUE);
+                       return 1;
+               }
+               conf->fst_cfg.priority = (u8) val;
+       } else if (os_strcmp(buf, "fst_llt") == 0) {
+               char *endp;
+               long int val;
+
+               if (!*pos) {
+                       wpa_printf(MSG_ERROR,
+                                  "Line %d: fst_llt value not supplied (expected 1..%u)",
+                                  line, FST_MAX_LLT_MS);
+                       return -1;
+               }
+               val = strtol(pos, &endp, 0);
+               if (*endp || val < 1 || val > FST_MAX_LLT_MS) {
+                       wpa_printf(MSG_ERROR,
+                                  "Line %d: Invalid fst_llt %ld (%s) (expected 1..%u)",
+                                  line, val, pos, FST_MAX_LLT_MS);
+                       return 1;
+               }
+               conf->fst_cfg.llt = (u32) val;
+#endif /* CONFIG_FST */
        } else {
                wpa_printf(MSG_ERROR,
                           "Line %d: unknown configuration item '%s'",
index 00fc142..6a4964e 100644 (file)
@@ -1747,6 +1747,32 @@ own_ip_addr=127.0.0.1
 #
 #osu_server_uri=...
 
+##### Fast Session Transfer (FST) support #####################################
+#
+# The options in this section are only available when the build configuration
+# option CONFIG_FST is set while compiling hostapd. They allow this interface
+# to be a part of FST setup.
+#
+# FST is the transfer of a session from a channel to another channel, in the
+# same or different frequency bands.
+#
+# For detals, see IEEE Std 802.11ad-2012.
+
+# Identifier of an FST Group the interface belongs to.
+#fst_group_id=bond0
+
+# Interface priority within the FST Group.
+# Announcing a higher priority for an interface means declaring it more
+# preferable for FST switch.
+# fst_priority is in 1..255 range with 1 being the lowest priority.
+#fst_priority=100
+
+# Default LLT value for this interface in milliseconds. The value used in case
+# no value provided during session setup. Default is 50 ms.
+# fst_llt is in 1..4294967 range (due to spec limitation, see 10.32.2.2
+# Transitioning between states).
+#fst_llt=100
+
 ##### TESTING OPTIONS #########################################################
 #
 # The options in this section are only available when the build configuration
index 2e7c138..b319587 100644 (file)
@@ -15,6 +15,7 @@
 #include "common/ieee802_11_defs.h"
 #include "common/ieee802_11_common.h"
 #include "wps/wps.h"
+#include "fst/fst.h"
 
 /**
  * mesh_conf - local MBSS state and settings
@@ -629,6 +630,10 @@ struct hostapd_config {
        u8 vht_oper_centr_freq_seg0_idx;
        u8 vht_oper_centr_freq_seg1_idx;
 
+#ifdef CONFIG_FST
+       struct fst_iface_cfg fst_cfg;
+#endif /* CONFIG_FST */
+
 #ifdef CONFIG_P2P
        u8 p2p_go_ctwindow;
 #endif /* CONFIG_P2P */