From patchwork Wed Sep 9 15:36:07 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: 249478 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp523720ilg; Wed, 9 Sep 2020 08:35:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+ThixuaxmRWVHKHZBPe0IAIsU8/v2WRocAoQxCabd5UGuDFL5QGDlPJsvdwJNG9IKXVa7 X-Received: by 2002:a6b:197:: with SMTP id 145mr3745463iob.100.1599665734224; Wed, 09 Sep 2020 08:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665734; cv=none; d=google.com; s=arc-20160816; b=PZ99iaagN+ugEgyKvzMB4j5yuBNVLkPfA7YSavtneNbwpgE5G69LIR7WGKcWJ9NCF2 GNpRETQS0jO7IrmbwAWxC5BGucJ/WHw/H3FqbuA+SpyT34iYk2ddIJRnXOLUbbTvvXVp Uk52+DspBpSDy04K+SjnUmcxTZNbERnf3DyNWc+qDcq65kqJGvlepOU/5uxEj6v9JWun FXVyeWoGWG+05iECJt0B6pW6DcsXdIdmqrDbYrqIwaPN3wb5JX9NK7cpoPmrZpWCdlgM jdk59KmRblQ33yCl7LU8wbVJYta3VDnWjvy9dbTkm6BfATfw0cpwAPnx3Ij60jYI2Aqv 3Xhg== 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=VMmNVFZWRU+zpvuT/erCCg/NctFOZsTKj+YoqNjPfSk=; b=tL46CKnZJ/5CnUtKTPL7NTpd02312IzCFwrB8Kb4+6PkkAELehbolxx6wEz23maRMt HWILstJICCln5t0fVxF3K+MoPtpyq0UvpNHg+ooBqpor8tJzKpq9vAd+Gjp/B1bf2kr9 MDi+4e+kB1hrnXtGG6MKdNHmdJ1ibZqcl22KrcqFtqKCrm0nkTfnfxbT8QVPk7ua/j/k q9RP9RZ+OPUN06L0ADECPoOtvjxmUXvqy534XajAfmx0QXEk1EeOwN2vghK1uW6YURnQ BYQYZZrLS/x0c47QJEN/MYnZj+M3LUQOsAE5QTkrCXVPUKqATvD4w1u8I81eu8YuYTzT PPZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=T8lyguTE; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=p1F1j9GB; 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 k18si2260072ilk.39.2020.09.09.08.35.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:34 -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=T8lyguTE; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=p1F1j9GB; 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=VMmNVFZWRU+zpvuT/erCCg/NctFOZsTKj+YoqNjPfSk=; b=T8lyguTE614Y+cmOJ4Pzjxp9H isgMP4pFa0TU4EccOjljvdcHv2ePpePMczQzzPKMLqqotlLIbReu7Mww68VwXd52OPs2YoYA8v6nQ BNvwTfB68fdDcHblLUT1oWBgQTFX3xQ7omdiI+P3YeMDHoKMSeoJjHX/0bUG32A6vKypWlv3sJsVr IASDR0cESeA5t+oh+hweXoos8+8GeiKrbXtGku+qQEGxKwGtms079ggSxL4uTplUr9AvFHhE3Y1LV Ff5rTgby4uiBzO9tGfGEWvX2R1wMZ0Nv0Ta3uG8m/S/YkVb8I/7wc4vwfzKRa+ejIJ9gVLSC21dL5 rdU4PaZOg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG28B-0006Od-82; Wed, 09 Sep 2020 15:35:31 +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 1kG287-0006Ml-RK for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:35:28 +0000 Received: by mail-wm1-x344.google.com with SMTP id b79so2820114wmb.4 for ; Wed, 09 Sep 2020 08:35:27 -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=oIyFTjtZqqz1/a9JDLpNoneKVIe4xiF8cj2LgmPKQKo=; b=p1F1j9GBStbqTAuf9N1+OYnjS5Oeo1GPYEvtZT/s0ZGkdaAvZxEXQyHqiJd5ztC2Pm G5HJASnm2OzOyhKv2IikPx3E79fI0HNY5/F6GcN4fqFQPJ7Mq3Gg6kVLljpJ9SCpylGi cKoZ1eyKPCmuUWR0VPD+uLqqHcZ2ZbMS614LUaKGBNcRdU80dCeHxHlqukYcqVxPyv/H 5eS27dXazUDRzlydUeQ2Vy/k5d3cgbflfbDvFQBYz67A0VVXOY8vYvl60AuNgbfje4ax hCg+dQyi5TRlAIUPgOSvQAocGm2AJ0eP6xgDOo2BigtjCIktuClHQ3C+t87Brh+skky6 BC/w== 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=oIyFTjtZqqz1/a9JDLpNoneKVIe4xiF8cj2LgmPKQKo=; b=Rr1uGNnyA5SKlRH6to1XOKU/19F9m1aBRAKKjl6b5egN85zksKKqYscA8Nvfedl5wJ uKjFsi8G7n6k9tJri0pRHQpcVvoVKkpH3PLN4p0OI+z2nhMPU5n+h5Qyo/xL0ggY+GEb y/xAEARwk5dGJ87PRUNQAfZA6E4auMZEEJfG3V6oBqwWPGXTUhH/LGz9N9AA5zdwXHGp +hTXBR12Xz/RLbtOkqhol3ViykD1J9FpJ7144JS8zd10ilACF4em6KFaAom96g+yD9jU qBLQXjqf1IriYZ49lFck8zKNjXYJQlKi46ol6hvHhDwM6Hb1mp25QzhQSg0ZsTRKMKOk NZlw== X-Gm-Message-State: AOAM530xuBXBT3NxpolBNcqBJy4vAnosa8csauXKG2wtz5P9zybadIPC ttcqWB3sDlPulxzRLU9jtrn7qQ== X-Received: by 2002:a1c:63c1:: with SMTP id x184mr4147993wmb.138.1599665727018; Wed, 09 Sep 2020 08:35:27 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:35:26 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 7/7] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Wed, 9 Sep 2020 16:36:07 +0100 Message-Id: <20200909153607.2904822-8-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_113527_921320_0AA8B44B X-CRM114-Status: GOOD ( 12.44 ) 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 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 fa6f5943a43d..f434c355d32d 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -1249,6 +1249,31 @@ 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) +{ + 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,