From patchwork Thu Sep 10 15:05:52 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: 249636 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp825402ilk; Thu, 10 Sep 2020 08:05:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMfMhJe6DvWYMpXVUzM3FtVR3S8PmQpoPcIDg/UrAtXVPeGV1cNZAzloyGAOnIVVLoBgc+ X-Received: by 2002:ab0:73c3:: with SMTP id m3mr3770797uaq.33.1599750319653; Thu, 10 Sep 2020 08:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599750319; cv=none; d=google.com; s=arc-20160816; b=raVe2Vl85p0UoHGENjiNkkWtX0jqUyPdTn8UX5eRQaAAxcJt5L9CyTOLqp63p8HPtz PSlDtA0nJDVu+sSZVS/2a89uy/Z1apYQ4Q/t42diZFF2RYXVKEgF40ZY8VTVM7afSEH2 n8LBFgF8o995WzVoH0lujNIVNeh0AVrsxAuRhpOKOGVttyRGKjD55UH5dAt/tqvsaKwi MA6XOPwsphTjFq0DDy3XLWHdeoMFtmnaKM4qAEuL8ZEqTKZCsFRrleaWPSHACwYvvGQZ E6ZFAdeM7/RPxMtn8fKpdtdvI4iwYtCGBmAwgfs9Bag36c85XC6tOKprS5BaqAGLWBZK 4k8w== 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=nJFdCum3bjTgjZzzz+hOHNF3MAtT74WqXvta2V6MX00=; b=odHbU7VTnguRUfB1p31TRvz+0A/nBleR55Fzryz31l6B32efKJvRMbnmOw7Os1hbFV ovVmAMVDHuPViIDqco0YVRF3oSAyT0p1qWpLwda1P6pLkebI7FGwjtM8AMLJvn60UZAx l+6ma7N6UbFncBiUV5NOgn+olCc+5PnR6loZqPvDXR+wxkkoLokiaKsIhVX75h8kJnTp cBGL9C0RAj5AFdYAg7u7cRpdFMjoAlh4ZdH/F8GVKqIRGgM6kLaO9Wxipkvl1fdjNtlo daS3OVUPMJtzuOqSl2XVYp4FwRpHp5k54Tmm19cI69MbDS6GD88QEwY7a6HdfGXg0kZE XwUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=YIYijVOC; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KWF1TE7u; 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 d10si962872vsp.56.2020.09.10.08.05.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:19 -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=YIYijVOC; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KWF1TE7u; 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=nJFdCum3bjTgjZzzz+hOHNF3MAtT74WqXvta2V6MX00=; b=YIYijVOCUX0zS9svkbvyOcAOI dJcw5I/FqNEORzNmRQ84T3JKkEsxgiWGOw1KC18aTnF2sSXfc0pnl6oA7DaVd8JEdIF1KxBvke5UZ rrClGRAvea62ZyBTikZaawjzWpJICWywpSY70VLN0NxPOV5i4adUXga7c3xJXZzfVbpfTwoq6Afgv Q8PEMvG3U8SeHg4A/z4uNiaM+1TsxrCXSgIm0mB/ZBJsMxD4PVuCc4Aoi+Ah9jDGXb28wLs6SFgou qCySP+q8wfkzVx7Af//PgqQeEkLGeq1iY7mAIiz7anMjhB1jCAF55Yeumfs+Kk6WFm/jEcsvvz702 73Wdc5Qow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO8R-0007XW-R6; Thu, 10 Sep 2020 15:05:15 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGO8O-0007VM-Mi for wcn36xx@lists.infradead.org; Thu, 10 Sep 2020 15:05:14 +0000 Received: by mail-wm1-x341.google.com with SMTP id l9so371454wme.3 for ; Thu, 10 Sep 2020 08:05:12 -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=CAsNGz4Cs4vTJ9gk8zApIj6qmRBVcghapi1gG95W8wE=; b=KWF1TE7unzAEhs8mBdAaCBqHg8xU0QTmm/1L49vgLG41pjIppgCTYMAuxQXE147tVK v+8eS110ObbZb7k0raX1jkSZH1UhLIjImIHJZpgSPlt5zDS9Xk7X8vP5i2XHKeiKhRHM n5EsAqCEKxyQigYfdMFfIsjRjVtdh9Wu8v3S7EIjYJwUNat3RCmYP8xfI2IEzfIdzqqF HSjf3B3SjiSDM4CdHSJsaFduFAzIAjIZLXVcpLYMZkBTJRa2suyrBJp0kkhBOZp19iI5 yjOr+HRfz/5pK7wuEBctRXhwMAv+nPGfUUhhaOQZVLqgqSst33oE6o18+qBVhjOTrAZ6 JbcQ== 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=CAsNGz4Cs4vTJ9gk8zApIj6qmRBVcghapi1gG95W8wE=; b=AKVgHsO9fn7zmd/dkElHg7u8OCki+CHUUcy1ACXB8q3uwqXrU7wIGAiSu4BMEMn/nc qyyZl9ByJbFc3vbrDget0ZBr5vwE3mzypHMy1aOdHuQtm0+eUF3AKa8xBCtd90bclYkh QhS/N2Nd5Z662VnMWIszQD4KPB5hUcrQDQ0Zz5XAjy3Wm90zl+GxZQFTPFAw3MS27W2c 2Oaayx+zJ5brodEgUy4LPwFWpM0NNklpC4cg9eC2v2PL1/x1mDyweqN+PTb6HHTGt3Cv FXE41JJdbPYXe9K3uccfzx2bGT2wv0Y1AXlq+s+12wc511QWL+4v1iuiHPwF3woPsP0n cmXw== X-Gm-Message-State: AOAM532dT78IU2fRVj1TPBW2j8F7VYmaR3ueAWC6/lcsK7EjxbY1hcPQ miWkl8laFkjbRvo0jFwjpy/9fQ== X-Received: by 2002:a1c:740c:: with SMTP id p12mr435592wmc.176.1599750311807; Thu, 10 Sep 2020 08:05:11 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Sep 2020 08:05:11 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v5 7/7] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Thu, 10 Sep 2020 16:05:52 +0100 Message-Id: <20200910150552.2178882-8-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_110512_849913_D4702952 X-CRM114-Status: GOOD ( 12.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:341 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 a wrapper function wcn36xx_smd_set_sta_params_v1() which calls into wcn36xx_smd_set_sta_params() and then subsequently sets version-1 specific parameters. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 30 ++++++++++++++++++++++++++ 1 file changed, 30 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 d5089aa382bd..71ecf3ef5ab2 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1262,6 +1262,36 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, v1->p2p = orig->p2p; } +void +wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_par); +void +wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct wcn36xx_hal_config_sta_params_v1 *sta_par) +{ + struct wcn36xx_sta *sta_priv = NULL; + struct wcn36xx_hal_config_sta_params sta_par_v0; + + wcn36xx_smd_set_sta_params(wcn, vif, sta, &sta_par_v0); + wcn36xx_smd_convert_sta_to_v1(wcn, &sta_par_v0, sta_par); + + if (sta) { + sta_priv = wcn36xx_sta_to_priv(sta); + wcn36xx_smd_set_sta_vht_params(wcn, sta, sta_par); + wcn36xx_smd_set_sta_ht_ldpc_params(sta, sta_par); + memcpy(&sta_par->supported_rates, &sta_priv->supported_rates, + sizeof(sta_par->supported_rates)); + } else { + wcn36xx_set_default_rates_v1(&sta_par->supported_rates); + wcn36xx_smd_set_sta_default_vht_params(wcn, sta_par); + wcn36xx_smd_set_sta_default_ht_ldpc_params(wcn, sta_par); + } +} + static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn, struct ieee80211_sta *sta, void *buf,