From patchwork Thu Sep 10 15:05:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 249637 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp825343ilk; Thu, 10 Sep 2020 08:05:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKg9VZn2U2/+PmvjBHg1KmmsFFGO5ACfPDlbD6ExXGTCCXflXVP40nanIcPISeEZ1Lduph X-Received: by 2002:ab0:71cb:: with SMTP id n11mr3852101uao.4.1599750317077; Thu, 10 Sep 2020 08:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750317; cv=none; d=google.com; s=arc-20160816; b=BJ4mPAYJauA1AD8OaXGoOoLMZnjJDFSik6oIZ7nsZigljcm2CS5H6mebrpjcZml8ON 2PysZfAzgFfqy44glP/v+lnBUNm8BfFw5w8tv0efW0+aRySmxC4+qgC2/jDrsHL+2c7x lH75aEVGV5dqebZUc216GuZxnoOMupt0aSGO8Ll5RuOXfIQeWOq+rwGRZUfRY96kFII8 3uz1DeZY8OAcymaupd15hQAKdb76iUtAI6ZvwNH7UpRUmZDsYoGwIHLsw9HADaNE4iNb tZq7aAVJRkSO3oi5ijE0XDQI3s2zaMv8u/6+5rxmN+TCCIEElA8mVvKb74xWe9Lj6Vyj UZtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:dkim-signature; bh=lolk5xic7R48FnHD4bxSApHATistOa/1mDOuvb3q6HY=; b=oRPKYryqdPlVuDD/D/R6BmAyw46y//nfIfuD8/LnG6Gl74Mt8jvcjashow8jRIISCl PYbf58OHq+pazTZ544h4LgHm4CZDIk+phJr77e8dfStXxfuWEW7t3obNyKD/5XnO97FF BpE61ab0aSzaudOZ2+bxqkMj++q8SaMm7M2ycxt4FeDX4Ozth7ubm80n+kwQA1YbCLm3 GgGRsHfCRLLgnVkYaZRJewkKAEEjN9LoL6E+MYXRyB7inE3ZR8bihjNZuMKeUq/3YhYX sR12fQkQkmtJjYezuT3ijj/JGippqaT5kFtmYF4kalgLKAB3PjFxjovoZmCCVokXWWwr B3qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=raS2k+3Z; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XhvUAiTc; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from merlin.infradead.org (merlin.infradead.org. [2001:8b0:10b:1231::1]) by mx.google.com with ESMTPS id 130si973697vka.37.2020.09.10.08.05.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) client-ip=2001:8b0:10b:1231::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=raS2k+3Z; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XhvUAiTc; spf=pass (google.com: best guess record for domain of wcn36xx-bounces+patch=linaro.org@lists.infradead.org designates 2001:8b0:10b:1231::1 as permitted sender) smtp.mailfrom="wcn36xx-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=lolk5xic7R48FnHD4bxSApHATistOa/1mDOuvb3q6HY=; b=raS2k+3Z7dKkdqB4lH5Pey8c5 2LBO90Bgduj6+Qwwh/WLjbMDQskRe/gs4R01+klnYkP2kjXUiilaIuYI1p9j5rQN+wSllO+qAp3Ew sp6eKTwz1RUofEatnfcFOeLNAlxX6vTDlFLoNb+EIpIffyjEuLwxseaevG4K4ocFYUYat7pxOMrGt 3jwjF2STAAjTSrEWSNpzIe2btglO2hB6WGhtnkJTX30b0e+M2nEm3QcZcGCWzQLBl1v5Xx39ZUF/a 0oaDqbveTl6FuyUKkIewWoDTcK+VxG+b6UWzT+L06QexowFdB9vUD2Cl3NbK5FY4gjjYazkYnYWrV 2Pw3/wwcw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO8P-0007WQ-Pg; Thu, 10 Sep 2020 15:05:13 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO8L-0007TV-Rq for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:05:10 +0000 Received: by mail-wm1-x344.google.com with SMTP id k18so357109wmj.5 for ; Thu, 10 Sep 2020 08:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f4Wm7zFdeM/PXkNGWzim4XzgHqQTMapz68tBAyod2iU=; b=XhvUAiTcPyQFkGpIWZwHI1zHlr55baPSQMkdq5SfjBQRf7DHDnQDCmA2/Jfpixf3yB ZltpY+FAT1VUZdu4L2strNyyUTYMIjqf0FZCkAZGBdIkCPsvX8Vdk5GgSaSLwPtrgbiO u/By95FDOTAosQAr4tDiLqJboOJvmF+SpWEiWbH6/giFEUKiN9l4FxWfIyRHk3/95mDZ kIwdGoU0AX09KnxNafhm+gs9lXzxBlk2klokLGlVympQZJ9vp98T3sldLMkaCMUycYB4 5AAvlUrqR3EGYivk4ymHdeY3qUtWbbH49qlme3fzpqo/Pc1lK0csmcs9JIpH22JbUs/h LcRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f4Wm7zFdeM/PXkNGWzim4XzgHqQTMapz68tBAyod2iU=; b=HS6Vc28pf7u4T0F//mMSPbJwVB2oABdltBng85+w8u6IPucxalwx93tBU2whS99Hj+ az7i9D+6Xa2AEInGpHI6fMMgcSOmXs/e9N0hrJ35vU32NJeh3EmpMSFc2bMhbT6mbSxB n1x/L9dM+zj13a87axWYeX/5mwAHpMe/o+1AjoI9NnmjzLACROypOMAVKb7gvLB9LIor JI5ekb5ZIVhYBg++tjkdbtUQEUVtqUSEXDWw9SZwQ1SABZma9EROfpZYfOeMcnofER3K lQwEA9PQ3NeVV0n+GilwHm5kL3wP6W8fqIdUEEOE/snUO7EcN+aEgNr6KyxnwGfZ3W57 czHA== X-Gm-Message-State: AOAM530SJAMd4Bwt53llaRzWXw330FAkS3ZPEXP1rTyoX0h+bCCLwi06 cz1wyjhcZTAhDc6riRadYFZpdQ== X-Received: by 2002:a1c:24c4:: with SMTP id k187mr444074wmk.148.1599750308810; Thu, 10 Sep 2020 08:05:08 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id g8sm3852620wmd.12.2020.09.10.08.05.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:08 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 4/7] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Thu, 10 Sep 2020 16:05:49 +0100 Message-Id: <20200910150552.2178882-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> References: <20200910150552.2178882-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_110509_907574_40425CD5 X-CRM114-Status: GOOD ( 13.23 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: wcn36xx@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bryan.odonoghue@linaro.org, shawn.guo@linaro.org, loic.poulain@linaro.org Sender: "wcn36xx" Errors-To: wcn36xx-bounces+patch=linaro.org@lists.infradead.org This commit adds support for setting VHT parameters based on the declared VHT capability bits in the VHT capability structure. We cannot do 160MHz so VHT Channel width set should be zero. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -- 2.27.0 _______________________________________________ wcn36xx mailing list wcn36xx@lists.infradead.org http://lists.infradead.org/mailman/listinfo/wcn36xx diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index e926bbaec220..1432f310f758 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -174,6 +174,31 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } +void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_params); +void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_params) +{ + if (sta->vht_cap.vht_supported) { + unsigned long caps = sta->vht_cap.cap; + + sta_params->vht_capable = sta->vht_cap.vht_supported; + sta_params->vht_ldpc_enabled = + is_cap_supported(caps, IEEE80211_VHT_CAP_RXLDPC); + if (get_feat_caps(wcn->fw_feat_caps, MU_MIMO)) { + sta_params->vht_tx_mu_beamformee_capable = + is_cap_supported(caps, IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE); + if (sta_params->vht_tx_mu_beamformee_capable) + sta_params->vht_tx_bf_enabled = 1; + } else { + sta_params->vht_tx_mu_beamformee_capable = 0; + } + sta_params->vht_tx_channel_width_set = 0; + } +} + static void wcn36xx_smd_set_sta_default_ht_params( struct wcn36xx_hal_config_sta_params *sta_params) {