From patchwork Sat Aug 29 03:39:06 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: 248684 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1602599ilg; Fri, 28 Aug 2020 20:38:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS+AeeLuWD8gBLaGbRVgGrS+uSMrLb7htpjeU2grYpB1lpuwuqXfVtxI2Tt1piaT7mODMq X-Received: by 2002:a05:6e02:670:: with SMTP id l16mr1611008ilt.52.1598672320295; Fri, 28 Aug 2020 20:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672320; cv=none; d=google.com; s=arc-20160816; b=vWNI1vlCHFg+L+x+95XfWD0PM2SoEW7QGJs2SWgwQuj+4BMNv3F7teUKEcPIYVPsfM mpP6OChHr/0Flf7gxBBGv3Q0LoD4FJ2tF87fesN/au2NAH9c47yt9NZZ6S0TocF7VQbV /C4TVT5+JF194MnjIB8Anga+P3Nu534N8vwXrHL/VxDIzi9s2JL+YxNUybll14BldTG9 K+SowA8uDMjpBj8apjvbxTyqQlQfLqpgMjAhNnLWPeMvTz7pdK7xOvcCJLtUQEG8xD/F //H+tDyT16Ie1+H6OiczUIyiS0tkPTSXDkmmx/xpihQTa3tCVG2zCev6C6j9JPNbpUdL IAMQ== 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=Wr3XQXjYnulkJl6kUEslQX5RR7J1NCJjholY/5ReGc0=; b=Jg0pY0BodzsgVpcmY1b5J5K7G57lZ7cWkx3mjcY1KC6MQmGAYglCuRRkmve1QqAmAt uURGp7ZFawtKCqqXqhbBEv/IyX7awkkEtwlZ3PDyG6RDy2h1jk8Iv11zmLJ6Po57PT/P vYMsTwtkt4YzLpKJXdZv/EswNIcnND0lSpaxG9PDisYWR0z5kD4q7me1EhsHVfE2Zf98 fO2/ET2fWcNdUUtz5+pGi0tm+9qlim+vJrl/auNGVh2yAHfwNZQLnWU+U7II6uU0cWHN aAf0+ZcbyunjTI4VF0nWQ1a8htQ+VVstseHAPzjebgXz3F/KB7zE8/wrve8fk/P5mQa7 XonQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=V5XLBfjD; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="HsD/yBUE"; 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 d15si1079900ilc.71.2020.08.28.20.38.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:40 -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=V5XLBfjD; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="HsD/yBUE"; 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=Wr3XQXjYnulkJl6kUEslQX5RR7J1NCJjholY/5ReGc0=; b=V5XLBfjDb1LPle0eo3yQfU3p+ AxpkCa6gL12GoSH8FbSx0vwUnnCLfoG98eSEFt8ztax2KrL13ZLM5I7gqqxzg/aW20yoldR+GiOle sLQqpMqvUvvyPw+b/0i2CvZ5l/VVCYfZPQHCi4yHAV67jSPgt4HL3MmeRK2WXgp2ASkN+JljWLjWO CfH4aJQrkJjlfTDeS//16X7Brxlz/0El25sGbBDgK1tSAPvN0YxfV1T9RQ1tWjLUHj+MB7fjcbmwU NuXuoWgHgjtZlu2aOIzsexecxAxt+/xwWajQGoFUN94hy7gonx6eFnxYkJV2iDRYS8clz/zmnolnd +2+PWadWg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhN-0002Nb-8i; Sat, 29 Aug 2020 03:38:37 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBrhJ-0002Ke-R2 for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:38:34 +0000 Received: by mail-wr1-x441.google.com with SMTP id x7so890708wro.3 for ; Fri, 28 Aug 2020 20:38:33 -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=0RMYH/02M6oKiIjtt+8hGNskxoP4IIcoXrMVBUBG1Lo=; b=HsD/yBUEYbSEtZLLJw3SgUCr9d8/UuJi6LSbknVKix1y7/gVJD17qoniEXrxPxlnjQ NJ+sPqQRkF11QZ/x9YFG+1UOVibOS/ByBFPBqIovhHzEhRFRoKxjSuHVcjrGx5BZ/Vxp rdojZojW6laTHl9WODWrZ5ERS1jWWjX6FwjaCPHRBIVF7bTFJfi3vHhZL3JDTERu/4Jd ZcNygK6e5+7LtF3k+4TdOzuuQXdS6mTtyIjIa2a6/YWKr9+DqUqV+2hCmoyajF9sqt2q wdvadmpLl66SwGmc0kVVp6uRCbzSANiviTO9JgiCcja0wJlKtKAKg84DDsIqkGcbavgz EzyA== 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=0RMYH/02M6oKiIjtt+8hGNskxoP4IIcoXrMVBUBG1Lo=; b=TLrbgIS3WcXiODSsuPSJuijt6Eshp849TSkcRiVLgqfETYympqHIWYMS/nKQWdmMEv fPy9YO4cPn25AhdoDYKZT+h4E+ygOJ2GNwX+g5lTRTXAoercsrrysbSNuwrJhHIjjq3R G3Vi4l/fLo8SK55DBn4NUfPI99RtyWmPktfbv1H9mMastejhAmW/0dfNhdydKY0ECZZA WZs5xuOdbKCawT6xqlOmXeyq6lSu7eR7G2+Jck+xDA/9lXlnlqVBPrFz5oJ9Ac2BP+Rd 5YLC2P1Mxy39kUDF/Rk8r+iVC6d6gE1HyrTSthRaFiwr7SLDATrCVdXsQRWhraq+rGtA EpTg== X-Gm-Message-State: AOAM530jPulBwgZftpqdFmpoOrnIehowGgPBJZ96iVO7J7tJ0Nd4ttic iHg4D9WT8XEgz/UQeLlxcCsKCg== X-Received: by 2002:a5d:56c7:: with SMTP id m7mr1695838wrw.322.1598672312952; Fri, 28 Aug 2020 20:38:32 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id t9sm1649179wmj.47.2020.08.28.20.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:38:32 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 10/12] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Sat, 29 Aug 2020 04:39:06 +0100 Message-Id: <20200829033908.2167689-11-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_233833_980082_CF78DAB2 X-CRM114-Status: GOOD ( 13.49 ) 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:441 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 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 | 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 b311b170fd36..86411f3da79d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1247,6 +1247,31 @@ static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, v1->p2p = orig->p2p; } +static 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,