From patchwork Tue Sep 8 18:24:34 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: 249318 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791386ilg; Tue, 8 Sep 2020 11:24:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlskSNHP/nTRIrYkpHIs5kp1O65p+TCyvFclpTmPxNLZx9ylotIApTAbtWHPzunFdIqDA2 X-Received: by 2002:a05:6602:189:: with SMTP id m9mr149351ioo.74.1599589442989; Tue, 08 Sep 2020 11:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589442; cv=none; d=google.com; s=arc-20160816; b=yXp7WY4ft1YqfWXajuBlBAHphgazDYW84OouFK1N4LdrDdKShgSkUfqAKuZt7AvhY8 8JAE+bd4nbelxG0C5it1SEJ/TOPY2F0w3r9VYbRKuWbqGH+Yvw3mD16C68FpDm+XsZv/ 7t3oCvZdCprXxNZrnTG0cn6VHtx449wvRtAV5M66mz2utxrmm6K5s7iboR+rcZtxbX2D gAjiJZ97ko8GgPze14jQn7+Jgu1//B1IHiFWeVUofD44G1zF0eaW0K9yIBmc2sNdcjTw hF6lyotpo2hUxB6LfvxSHLMvhOWxp+wiP/N2qKcUzITSjejBk8FFKga/04VW9969QwZb 96/w== 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=APByRmt9Qkv/iSCwPOf9/amoaJFqhsHZQyyZvcbYXga2WWGigN7f+0aTCsB87+Z7aY zbOyJQL6r/zbSdTaHXwXyCpfu+x+WiH0Y4zWd34fwufqnw/LH1ISgOHcrS5ASUpm4JXL Eb8+hLqinhLmUgzJGEcm+QvFY26xxWr6bVpzoZH7X3tLYAYKtnTmAGaaG7PXJEWZm0cz j4A6UWMJTRqAoIWVrkQnjSC9KOVZFswzUw/nUklvr8FWK7V8PisbBA0QizkSV5Gw0x6P ILZSg3ZU0u2BhWHWxPszlPTmSbwWUiJ5lCCPJ2JKIuS3pd9DMT1bSXXvKk4NrlCVw8Sx JIJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=0he1AURd; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=mzC+qw3P; 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 f19si18086476jar.103.2020.09.08.11.24.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:02 -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=0he1AURd; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=mzC+qw3P; 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=0he1AURdLxnK9P//k0IbheNtH Qj3xtOe7hEdCk2fKR7rm2tEfTIok4WrGaXqoPSD6Y8/+kUkOMGI1FQ6QDrkthXcuvlADtLdxk7UUT XJjGAmPn5P8LyN2DZ5+jxk90Ek6TMoYC/glmJ9v2nHRKxVyTyTiGgtmzWdEUWsvkksCLsdV2qfLZh Jyz31neCifRzViB0NcBW0lFEv9C9DgDS+k1kLqJJiy6vO6L0NpZSaRdUQwajlwKFdsaN7g1wKMg+2 l84U6Wqy/9FBsROPAw/fVmdAXjCmuIIs7JFu2sLh3r20/gf3Y4YdXYEMCctMjGZ6k8fG5I2isl4QK YEB+I9fTw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiHf-00052T-V9; Tue, 08 Sep 2020 18:23:59 +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 1kFiHb-0004yf-A4 for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:23:56 +0000 Received: by mail-wm1-x344.google.com with SMTP id b79so297279wmb.4 for ; Tue, 08 Sep 2020 11:23:55 -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=mzC+qw3PBiNDtT3lcLfVPhDiSpqYDd06JZfexYQ4PrNGCgSwzhbC13oSWY9nVLojy0 Ba6n/nRYKOMnCqCz3ivfD/WdLGM7CUiRKXQncfcN10ad8t3m9Fs5tQZl/zs+ALihrw9x 8uVdP+JbF0Gqj4phgy9qgBo16eMN3LJ/GhM/6kVon7YJO5IXHxcaRxgfst7ji3XvtoPJ 38vvyIopps6bW95W+4PTuzougoCQ0n+Be+vQm890Iw9vg05mtSLRzhw0v/ClbX48iC2t Uj4XZR9rhqocM1f397uS4SFCt+7lXh+FwY2oGxFE9Tb9bG2wCWzmIBTEvvG5mrjSjys7 CHnQ== 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=jxMsiANYGwEJ2nYUdM76JBZ1ZgBdRuNXuXw+sPU+HXPu5QmFqMYKdfHU5si4d27bvT A2Ynqxz9aoXZ5bkBUEapvLU70gyFUpMq/TpHXD0QIXLek/NSy2q/+hYQ657H06hciyeo JLZ2G00fQWf6hwa8gtFE/qIGV0vlhtGLinD0+Rfz+CEVAfzwRmcz2/O7XG30AqS7QhAs zKk7wzDEDxZpgbV6GSg1Jym1h2fDPXoO9TtJlTKMrI9UaJavXqcCrFLRIWtiZwEBdLkM MxVdIV9ZJVr10YAM54goPCzR5uoCZmtxJH476B5IHzW6CPs70Z0cKxIJGOd4g93A7p3e +tHg== X-Gm-Message-State: AOAM530XBjentLWeRRPeftkF/SK71+mfZ+P/qeRbGVn6TYICP0tpegxc id4Wk2LrkbYzLkR00duD0vyOFw== X-Received: by 2002:a1c:bdc4:: with SMTP id n187mr362132wmf.109.1599589434392; Tue, 08 Sep 2020 11:23:54 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:53 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 4/7] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Tue, 8 Sep 2020 19:24:34 +0100 Message-Id: <20200908182437.2870281-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200908182437.2870281-1-bryan.odonoghue@linaro.org> References: <20200908182437.2870281-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-20200908_142355_381179_60A426DC X-CRM114-Status: GOOD ( 13.82 ) 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 Message has at least one valid DKIM or DK signature -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 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) {