From patchwork Sat Aug 29 03:39:03 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: 248681 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602573ilg; Fri, 28 Aug 2020 20:38:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydDMh02szYIcQPlymoZLNx0219mXvKKEz9TGndi660W0wJiffOVfDlP+lYvt0bi2HkF65C X-Received: by 2002:a05:6e02:686:: with SMTP id o6mr1429619ils.188.1598672317021; Fri, 28 Aug 2020 20:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672317; cv=none; d=google.com; s=arc-20160816; b=JIAcmYM1eXIqVYQUarnpOqj1XPFv/eDJZK0gtfvGg9ZdPtxrE/g6vKyE8OFqcfK4ID hictFrEqQCvnOW8TgEKZrFwHPnxB6VeUUw/haNmk2A2z65yycPqkPi8zNoJjihhuJsKx /9algT6WTH3lxvKTjwdx71yGfCCWXLv/3eccHHsTtzHhpRcYvTOMx1tdrANSq7KlIzt5 zfMT+gPd4FGaZke9OTortXey8SYXkKeudC59EbDoxgxcjGz8bsx6iyI3V0il71KuvVAD xv8ZWVGFbMAyukLITNuJu4QFtn6hFwgMTuUjB5iRZlUMuLvbMYLmXU2GIZwkNWzuFStE 0z/Q== 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=1IXeAFLdOgK8WmroMvVQnJPJdc3zEyw/72w1saqI+2I=; b=OVU6TpTPeHvqJO9d8J/TOR2/c3j164jQjOehgTupsh4MHl5B3AYRKd7T7IC0OopwSj JTSIlRvbc1lSK/BeG2QBsg83dGUv8hWaC97jiC5J0hYWc2fY1vaTPBVq0TDqbCfJdZfK uUulYgx9V9vs3uZBe4c52VvcWvT4XD7gmsqjVHitYS+V0v7EqcIR74s3M1nj7osQ5QFU 68fK10wLj0NahVD8PU82H6kTChhZu/QZYtCup8f9zyD2oDueaSezhRKG36j4Zxp5SzmV cKyKtadWzBcQRpT6d+KeBG0TvFrCrctPtS4M6NcC8cMy2CWjo/BMAl1BdRWdd6Bz0v0y 0gEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=bSrPvQWE; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=chkDDSvX; 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 v66si780101iof.4.2020.08.28.20.38.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:37 -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=bSrPvQWE; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=chkDDSvX; 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=1IXeAFLdOgK8WmroMvVQnJPJdc3zEyw/72w1saqI+2I=; b=bSrPvQWERfSXDcu1YHlEFCiR0 QavmVhyjQIXytWSMC9LPebJuz5u64dvZ4GJnOZVqcf5HRcIvnZsrijKcBFHGy46x8gcckUmql3hbj NTXG1hou56aYLnob4YzGgWq0kpjoB3elgbsP6fWfmYtrUzvapYqCH6j3qQVBlbsPfmH8K8kMLk9xm i2GUbVphWyP9GDX/YJWjlyUolD7HFuDLbzRgNCMiKDI+bJ47JmnPvBahOND7Q7G+Nvd9zcTSd0n7g qb3ogY9M+cA2TyBsMPxfU30uNlcijKD+5ABprnmLN9Dk51NiRTU6vdCZeZ8eWw4u3ZAd9eYZrcw5O 7/m15iEqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhJ-0002Ky-PD; Sat, 29 Aug 2020 03:38:33 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhG-0002IS-M8 for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:38:31 +0000 Received: by mail-wm1-x343.google.com with SMTP id e17so742305wme.0 for ; Fri, 28 Aug 2020 20:38:30 -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=TmR05A4AK9OYzFaj9nhkuPpkc17LEC7HRemOYw1ipAM=; b=chkDDSvXyNhrlh1LTOIS4kjVq/z8+YDiHm+mGi0xHbX5Z+p6tVgWEP76vX1T+YdJ7Y fn8BNI1hq98BdC9JnWYMcn00sLk5aNJ3WtcqSw4D3ofaHeekkXR5iqGFEQOxZ4pKjCBC MVNMOc0YCji8md2v0Od7Sw10neR8GBdE9MLHREjWbneYZFZz/xjP87acfiV+wp8hI7SI g+Sr7RYwwG0q0Tof6LiBcOFh5w3IK2g1ehk1cxPfI7UqPia5jGHa7p01rq41dsZ4QnFu VRDki7nJdYuSyL6PP7TTG7iYSAmKuCnSAzpyrDoVLSdjgYun49PkH2uNmA/SasSgsyDw ihHw== 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=TmR05A4AK9OYzFaj9nhkuPpkc17LEC7HRemOYw1ipAM=; b=e20yUf63mm7osPQWiWik2v9m8543TxTUzG7jgjvANALpWBqOQINwJLycu8t58NrEXP CtwScXfCMkr388MVWAB9sT9KYc4BB9+AOVsZ0XwITtKo7uS5k5KWZv2B9Tx14QZuKzDX D/0uuGOhXz+tv3rKmfqozbfzkZWSffb97UBIpVlbXkOD5wHD9O3BNwSioYFsVLXzyRMi 3rAKK3LtwaKt3R9cfmoN/GJKeMVkLkQqt486ZQdqqgbyiclXeyatIAC5II2wSFF6ixBv b78t22dJin46G5qAy6HzzCzagL/xjxcn18d8QteOAiAZ7J+xYIFcgivrvB4rY1DYLRlB 5Zpg== X-Gm-Message-State: AOAM5312PjRS33NATZYQik/lNWWrmJsn5UolJeXv2F6/MqSgXVMwRDsg 4/xLU9cQjQNhdXfLgvyLTijGXnYjiq7qE5Gp X-Received: by 2002:a1c:2985:: with SMTP id p127mr1431306wmp.166.1598672309743; Fri, 28 Aug 2020 20:38:29 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:29 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 07/12] wcn36xx: Add wcn36xx_smd_set_sta_vht_params() Date: Sat, 29 Aug 2020 04:39:03 +0100 Message-Id: <20200829033908.2167689-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829033908.2167689-1-bryan.odonoghue@linaro.org> References: <20200829033908.2167689-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-20200828_233830_790782_F7D6267C X-CRM114-Status: GOOD ( 14.09 ) 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:343 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 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 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. The bit-field TX-BF is purposefully left out since wcn3680 is the only wcn36xx that can do VHT/80211.ac and is not TX beamformer capable. TX-BF is a dead bit. Similarly 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 | 20 ++++++++++++++++++++ 1 file changed, 20 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 cf20a0f63259..e44e4a21153e 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -174,6 +174,26 @@ static void wcn36xx_smd_set_sta_ht_params(struct ieee80211_sta *sta, } } +static 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); + } 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) {