]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
VHT: Add configuration of operating center frequency
authorMahesh Palivela <maheshp@posedge.com>
Fri, 10 Aug 2012 16:54:54 +0000 (19:54 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 10 Aug 2012 16:54:54 +0000 (19:54 +0300)
Signed-hostap: Mahesh Palivela <maheshp@posedge.com>

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

index b9ba7009927866f4025ef1206fcf3fb64d788578..1bc0d4dd5c6d8e4057db08e0407c33eb61b7d1a9 100644 (file)
@@ -2226,6 +2226,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                        conf->require_vht = atoi(pos);
                } else if (os_strcmp(buf, "vht_oper_chwidth") == 0) {
                        conf->vht_oper_chwidth = atoi(pos);
+               } else if (os_strcmp(buf, "vht_oper_centr_freq_seg0_idx") == 0)
+               {
+                       conf->vht_oper_centr_freq_seg0_idx = atoi(pos);
 #endif /* CONFIG_IEEE80211AC */
                } else if (os_strcmp(buf, "max_listen_interval") == 0) {
                        bss->max_listen_interval = atoi(pos);
index 41c10e89f7567f9ffb32705855e47cda5b499218..1740b49fa5222f3e1ef3bad87d4fcf3a88b0e055 100644 (file)
@@ -559,6 +559,12 @@ wmm_ac_vo_acm=0
 # 2 = 160 MHz channel width
 # 3 = 80+80 MHz channel width
 #vht_oper_chwidth=1
+#
+# center freq = 5 GHz + (5 * index)
+# So index 42 gives center freq 5.210 GHz
+# which is channel 42 in 5G band
+#
+#vht_oper_centr_freq_seg0_idx=42
 
 ##### IEEE 802.1X-2004 related configuration ##################################
 
index af3140364d918d6bfb422517d91858fb05986990..5dc310ebf9a2cfa2bfe7a72f30ea4502a8bc2835 100644 (file)
@@ -478,6 +478,7 @@ struct hostapd_config {
        int ieee80211ac;
        int require_vht;
        u8 vht_oper_chwidth;
+       u8 vht_oper_centr_freq_seg0_idx;
 };
 
 
index f224288f784b72e661cf5e91dd613dc7ffed8df0..7599ef8d774d02fa8de1ca2d75f0917a26323fdf 100644 (file)
@@ -61,6 +61,14 @@ u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid)
        oper = (struct ieee80211_vht_operation *) pos;
        os_memset(oper, 0, sizeof(*oper));
 
+       /*
+        * center freq = 5 GHz + (5 * index)
+        * So index 42 gives center freq 5.210 GHz
+        * which is channel 42 in 5G band
+        */
+       oper->vht_op_info_chan_center_freq_seg0_idx =
+               hapd->iconf->vht_oper_centr_freq_seg0_idx;
+
        oper->vht_op_info_chwidth = hapd->iconf->vht_oper_chwidth;
 
        /* VHT Basic MCS set comes from hw */