From patchwork Tue Mar 7 16:20:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 736289 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vd2711t7Wz9sDb for ; Wed, 8 Mar 2017 03:24:41 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gl9L6ZkC"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=FnyWPsellZtXoJxk5reL1y4dZ4eu88hkOH8wfIzjT7k=; b=gl9 L6ZkCANGIqvdn/Ud4mahzdkJRtBhCSKSUDnWWB3hDEYPoDnLWBsj1DfmbOMCvFjO0004Lr4zAppwS Rby1u1C/jXG/C/xbv1nABJmq3BT08R/UQTJZSQYomwoOFoDjNULfIrPwvq+1rAkDeHxg4w4BtB2R0 a1PTHnMZbr9ucNuNmTqMI+EeueqN96ydlOtJ02qGJJyw2QQKD36UpmKT7XoXj+5r0xzooND72qQRg T7jdvocg65/tagm0CVBMz6EDobIxUwHXGGjQlvdZpfTH8ugb3FmMCHTkQYldCnBv3YjhYQLYaSycK rwVFA0aJYNsgRRSo5v2oqYCUmJ7bCPA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1clHug-0003md-BO; Tue, 07 Mar 2017 16:24:38 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1clHuc-0003k3-MW for hostap@lists.infradead.org; Tue, 07 Mar 2017 16:24:36 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2017 08:23:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.36,258,1486454400"; d="scan'208"; a="1139083022" Received: from unknown (HELO TEMPHOSTNAME.ger.corp.intel.com) ([10.12.217.219]) by fmsmga002.fm.intel.com with ESMTP; 07 Mar 2017 08:22:48 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Subject: [PATCH 3/3] wpa_supplicant: ap: allow disabling HT without HT overrides Date: Tue, 7 Mar 2017 18:20:59 +0200 Message-Id: <1488903659-8807-3-git-send-email-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170307_082434_799175_5530E035 X-CRM114-Status: GOOD ( 13.47 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.55.52.88 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [192.55.52.88 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Since VHT can be toggled explicitly, also expose being able to disable HT explicitly, without requiring HT overrides. Continue making it default to enabled though. Signed-off-by: Johannes Berg --- wpa_supplicant/ap.c | 7 +++++-- wpa_supplicant/config.c | 2 ++ wpa_supplicant/config_file.c | 1 + wpa_supplicant/config_ssid.h | 1 + wpa_supplicant/wpa_cli.c | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 494ae67..568a29c 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -145,12 +145,15 @@ int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s, } #ifdef CONFIG_HT_OVERRIDES - if (ssid->disable_ht) { + if (ssid->disable_ht) + ssid->ht = 0; +#endif /* CONFIG_HT_OVERRIDES */ + + if (!ssid->ht) { conf->ieee80211n = 0; conf->ht_capab = 0; no_ht = 1; } -#endif /* CONFIG_HT_OVERRIDES */ if (!no_ht && mode && mode->ht_capab) { conf->ieee80211n = 1; diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 319873f..027d232 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -1995,6 +1995,7 @@ static const struct parse_data ssid_fields[] = { { FUNC(auth_alg) }, { FUNC(scan_freq) }, { FUNC(freq_list) }, + { INT_RANGE(ht, 0, 1) }, { INT_RANGE(vht, 0, 1) }, { INT_RANGE(ht40, -1, 1) }, { INT_RANGE(max_oper_chwidth, VHT_CHANWIDTH_USE_HT, @@ -2580,6 +2581,7 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid) ssid->group_cipher = DEFAULT_GROUP; ssid->key_mgmt = DEFAULT_KEY_MGMT; ssid->bg_scan_period = DEFAULT_BG_SCAN_PERIOD; + ssid->ht = 1; #ifdef IEEE8021X_EAPOL ssid->eapol_flags = DEFAULT_EAPOL_FLAGS; ssid->eap_workaround = DEFAULT_EAP_WORKAROUND; diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c index 84ea075..01f003a 100644 --- a/wpa_supplicant/config_file.c +++ b/wpa_supplicant/config_file.c @@ -793,6 +793,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid) INT(peerkey); INT(mixed_cell); INT(vht); + INT(ht); INT(ht40); INT(max_oper_chwidth); INT(vht_center_freq1); diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h index a2482d4..908b641 100644 --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h @@ -470,6 +470,7 @@ struct wpa_ssid { int dot11MeshConfirmTimeout; /* msec */ int dot11MeshHoldingTimeout; /* msec */ + int ht; int ht40; int vht; diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index f5e7cda..5f3dcfe 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -1371,7 +1371,7 @@ static const char *network_fields[] = { "bssid_whitelist", "psk", "proto", "key_mgmt", "bg_scan_period", "pairwise", "group", "auth_alg", "scan_freq", "freq_list", "max_oper_chwidth", "ht40", "vht", "vht_center_freq1", - "vht_center_freq2", + "vht_center_freq2", "ht", #ifdef IEEE8021X_EAPOL "eap", "identity", "anonymous_identity", "password", "ca_cert", "ca_path", "client_cert", "private_key", "private_key_passwd",