From patchwork Tue Nov 20 16:24:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 200385 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id EADF62C007A for ; Wed, 21 Nov 2012 03:24:37 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 4B87A9C19B; Tue, 20 Nov 2012 11:24:32 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n0g0ExXVcoZx; Tue, 20 Nov 2012 11:24:32 -0500 (EST) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id CC6309C18E; Tue, 20 Nov 2012 11:24:27 -0500 (EST) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 8FCAE9C190 for ; Tue, 20 Nov 2012 11:24:26 -0500 (EST) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7RYtWS9iCPTZ for ; Tue, 20 Nov 2012 11:24:21 -0500 (EST) Received: from sipsolutions.net (he.sipsolutions.net [78.46.109.217]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 92CB09C18E for ; Tue, 20 Nov 2012 11:24:21 -0500 (EST) Received: by sipsolutions.net with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1TaqcU-0005hp-60; Tue, 20 Nov 2012 17:24:18 +0100 From: Johannes Berg To: hostap@lists.shmoo.com Subject: [PATCH 2/2] hostapd: add second VHT frequency segment config Date: Tue, 20 Nov 2012 17:24:44 +0100 Message-Id: <1353428684-31305-2-git-send-email-johannes@sipsolutions.net> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1353428684-31305-1-git-send-email-johannes@sipsolutions.net> References: <1353428684-31305-1-git-send-email-johannes@sipsolutions.net> Cc: Johannes Berg X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Johannes Berg 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 --- hostapd/config_file.c | 5 +++-- hostapd/hostapd.conf | 6 ++++++ src/ap/ap_config.h | 1 + src/ap/ieee802_11_vht.c | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index f9b3984..f91fa80 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -2515,9 +2515,10 @@ 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) - { + } 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); diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf index edbd772..3a1b0c7 100644 --- a/hostapd/hostapd.conf +++ b/hostapd/hostapd.conf @@ -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 42 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 ################################## diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h index f5e4a6a..2722321 100644 --- a/src/ap/ap_config.h +++ b/src/ap/ap_config.h @@ -505,6 +505,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; }; diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c index 7599ef8..b21c2b7 100644 --- a/src/ap/ieee802_11_vht.c +++ b/src/ap/ieee802_11_vht.c @@ -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;