]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Add second VHT frequency segment config
authorJohannes Berg <johannes.berg@intel.com>
Sat, 24 Nov 2012 16:02:29 +0000 (18:02 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 24 Nov 2012 16:02:29 +0000 (18:02 +0200)
Add the configuration option vht_oper_centr_freq_seg1_idx
for the second segment of an 80+80 MHz channel and use it
when building the VHT operation IE.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

hostapd/config_file.c
hostapd/hostapd.conf
src/ap/ap_config.h
src/ap/ieee802_11_vht.c

index 7c9f941c2d2307dc8f812ea4f6d002c8cf7da370..8af8157a762a45f9bb1446066d7e027a10d9390e 100644 (file)
@@ -2524,6 +2524,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                } else if (os_strcmp(buf, "vht_oper_centr_freq_seg0_idx") == 0)
                {
                        conf->vht_oper_centr_freq_seg0_idx = atoi(pos);
+               } else if (os_strcmp(buf, "vht_oper_centr_freq_seg1_idx") == 0)
+               {
+                       conf->vht_oper_centr_freq_seg1_idx = atoi(pos);
 #endif /* CONFIG_IEEE80211AC */
                } else if (os_strcmp(buf, "max_listen_interval") == 0) {
                        bss->max_listen_interval = atoi(pos);
index 5f0eb96661de8477c3d2ca4882f4d58eaf4d7c99..c839ad0ca5d64f6bb34effe59564be87e620c579 100644 (file)
@@ -572,6 +572,12 @@ wmm_ac_vo_acm=0
 # which is channel 42 in 5G band
 #
 #vht_oper_centr_freq_seg0_idx=42
+#
+# center freq = 5 GHz + (5 * index)
+# So index 159 gives center freq 5.795 GHz
+# which is channel 159 in 5G band
+#
+#vht_oper_centr_freq_seg1_idx=159
 
 ##### IEEE 802.1X-2004 related configuration ##################################
 
index 0a83856d0391f1ad907f630d2289636ee70c2987..010d2164510eaf5887db5ff41dec4a6863bef9dd 100644 (file)
@@ -506,6 +506,7 @@ struct hostapd_config {
        int require_vht;
        u8 vht_oper_chwidth;
        u8 vht_oper_centr_freq_seg0_idx;
+       u8 vht_oper_centr_freq_seg1_idx;
 };
 
 
index 7599ef8d774d02fa8de1ca2d75f0917a26323fdf..b21c2b7fb0d2297eede59fbc3d17805497c3f473 100644 (file)
@@ -68,6 +68,8 @@ u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid)
         */
        oper->vht_op_info_chan_center_freq_seg0_idx =
                hapd->iconf->vht_oper_centr_freq_seg0_idx;
+       oper->vht_op_info_chan_center_freq_seg1_idx =
+               hapd->iconf->vht_oper_centr_freq_seg1_idx;
 
        oper->vht_op_info_chwidth = hapd->iconf->vht_oper_chwidth;