From patchwork Wed Sep 9 15:36:04 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: 249475 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp523671ilg; Wed, 9 Sep 2020 08:35:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKnVEaexpR3hV3QY8kQboV5sLgqcU5C6NpGZV0OZDMhEy35fsQWgkD7DwigSF4QCaqxgme X-Received: by 2002:a92:4001:: with SMTP id n1mr4231273ila.69.1599665730859; Wed, 09 Sep 2020 08:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665730; cv=none; d=google.com; s=arc-20160816; b=Z8gq+7Ki4tW2ldBJ3nKsa5LNe5ZZj16ZNXJYyi6dQQjyZfIK77TmxmNsUjnc7K4Ai4 XPPGDAYlf/MDmQ6S2LoAVQRqU74M9MQmqHyhGTxHG8lpRRGoJ6D9x4n2C6PsKC2OFRRW 5+XH+HY4Mxcq63WzFyFepmrp4KoB5WI+yc/fT5FYMchv3Hmr6+7SjJYD6/IrKHKwaTLp XGlXlzHS7AtrVDgEMCjsvCU6ccs4X7+7TLma5W+fBeTu5xcrKsf+QIq0Tp3nfJFhE54W l1esIb5en5E15X4yzyclLFkwR332RWi8WgejWIM7ws4h/j2nFex6JQ/teqLZWkgEknZR 0MSg== 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=lzrAu7tVpkLLeh6cP2kuuoTAkCI97ffnY/3EfoVpLz0=; b=PVYDwQfPnKICxjv3d4nIqMCx8Yl3IThCIWoGw2+6ZZIaK68+cXAXtfwZbDJoIHv1w4 IzLEaUYuwFPI8R6P5083P6BjMUdIPrhFhDq31LIcZqjYbeMYjRK53a1m1lLgyl+DPF6H 328W2XWQZ1vZSROTvyJ0DrTWWi3lTSrzcq2RY0PGe47yUaIAgTRh469JDl1iHdD4bsGS Gs4B6koIWPeggDVK1jgYtrKQeUb0jBQiM5RcyeU0cAVxbgSxEZZbYdII5WPkMHDa2S8d Iv1+XGIgEsuWn+hPC9r4q/DU77LMQMjuL/v2Rgl03vWhDjEVk4XyINLacWkgut/QGgUB qegA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=iwxfkQ5Q; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="aQ8/qJTn"; 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 g12si2236162iow.85.2020.09.09.08.35.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:30 -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=iwxfkQ5Q; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="aQ8/qJTn"; 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=lzrAu7tVpkLLeh6cP2kuuoTAkCI97ffnY/3EfoVpLz0=; b=iwxfkQ5QFoS3uvLbCcNXe9EMB o6JrCDb9Dc2YVmWBmeSJkMV8NORKSCR8acYgg2w0uOn5em2VBxsu6G558/8qb14RQp/4TJflNJU5o kMf0IOvqkMX239HDNPYVLQvAs5CP3zf8pNb/XF48JHiUNygVSS0sYTXQojacr4QA4+0fQ9y+3awtL mCpn6Hf+29T7SxTNT0kv5EeeEFwP7ywOGhflqACcWeEGUcEyxvOFDzkAK5GrJ7r4AHMpfl2DTmkMc CJt2at5KJLuowWo90yZhRz1pYL3cKlhO1q2cCzHpXJQYyiYdqTM02d3bkuciPWppcIp+Oi6PXkG5q eeY4z+V9w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG287-0006Mu-Ls; Wed, 09 Sep 2020 15:35:27 +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 1kG284-0006Kv-Py for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:35:25 +0000 Received: by mail-wm1-x344.google.com with SMTP id a9so2833900wmm.2 for ; Wed, 09 Sep 2020 08:35:24 -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=0kUBjvvwl59BwNDewkzvG1ZSSZyLN3Mzs35/KuiVmWA=; b=aQ8/qJTnIosWf8oaUZYlsVXTXol7ua5ZbHXFTI2Txf0+d87Iak0A0pgHxBuBO3wR6v 4jSFPyDL5RG7JZ/4F3ILmdgo4J2pJtVeTUuo/np/+tYy2acon7gLX1Vczazf2bIjUUQM 2aspNUTnkPsshWET/2uiWme4dlj4LhZOmwgXcnS9cV/lQfPw8JuLEfmz34tpRvECrOo6 OENWY6IdANrg59qeUhih4d2HHK+VasFrft8qcO1DgexWNK+3pqtmhvnBJ2g0OaIrIp9G 9LsZ+vVTZsmKZUBg0YBKhlAUvUjUw4jGPvSbaKHTWP36e2F/JeIIntK2ribRNG+w7oqv UDwg== 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=0kUBjvvwl59BwNDewkzvG1ZSSZyLN3Mzs35/KuiVmWA=; b=t538WwWE1tKjCuny10I/+MP6fQ5TCxA1n7qKPiNi/TZNZqRmD4HrnmKQUNDJRlfoqR YoR/eI46jmXo8kA4Y60lvu0Jycawi1PewBySaStn17HnJk5S4Pa9C93ejZv3Lfs/9vp8 s9UTeiiPlbpZobueLEpfNUgR16xZu31SckR+KhHiLdNVWaFXRIFMhW4BI3TGHF/tip7e wp88mmPRm0z7RIP2fhnv/0xzBsCjjlVJpOFC/qwpg+e3eSpkcboKB42AkZr0QhvjiGxl 8erLw7O1PqeX5d8oW8GQ1iuK6k9bpQRKcuUY2nLq/duFTJMF8MWpYjaAhgHZI+SPUk6h ySiw== X-Gm-Message-State: AOAM532vFsk+YX4qg+9trP5oh79ECn4Iruurm/oX6EO4ltLBcf57Xk2a RvKAOeM2bXQbxNbYWIY6HFfLew== X-Received: by 2002:a05:600c:2257:: with SMTP id a23mr4297084wmm.102.1599665723762; Wed, 09 Sep 2020 08:35:23 -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 s2sm4473335wrw.96.2020.09.09.08.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:23 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 4/7] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Wed, 9 Sep 2020 16:36:04 +0100 Message-Id: <20200909153607.2904822-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153607.2904822-1-bryan.odonoghue@linaro.org> References: <20200909153607.2904822-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-20200909_113524_859183_B2A50020 X-CRM114-Status: GOOD ( 12.67 ) 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 | 22 ++++++++++++++++++++++ 1 file changed, 22 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 3f57acfe11bb..a563a30c3a0c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -174,6 +174,28 @@ 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) +{ + 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) {