From patchwork Tue Sep 8 18:24:37 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: 249322 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4791421ilg; Tue, 8 Sep 2020 11:24:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFriRkQ4JVpIGyCYwi6RbOncQpIHh1zi0w2OSQ7Zg00aJAFKWlgEP5W6aIC0CtwPewq/35 X-Received: by 2002:a05:6e02:be7:: with SMTP id d7mr14867ilu.219.1599589444879; Tue, 08 Sep 2020 11:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599589444; cv=none; d=google.com; s=arc-20160816; b=Ezp3xThYW75s2/4nzFsHewNq0n1oPFo0VaIho8QSjjvQoEctCG5lzITPLCxm31ABYY kN/xztda36XpLjh/eNjNukq9La+DJS8y2cgZnMr8ic4cpZ+KtLg8DCOOMQLfthnkj+Dv uyTXUSfwGEHBNumgNDvQ7hYs8KvtCmTKmR8+qJGau6s81+upkZCeoJ4CdhmInO/78pax tzFk3ms+emzlDFnekSJmAq4atpiu6x+bMY1nhHaBOIMwsWy1xlwIxqbkLxOCA7GKUVuL +EznFMtT6FK3NAbtjPI1YOaRBqE6vrSUGMk2ZkhZw143cgaIfJHYb7uCJ7soyNMFEa+i TANA== 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=X7fiaddytXOZQSuLA//vBo/syxExrxEsdk9Ufk0/hT7WydfqQ1FhIVHOnmHVV+FDeY xzQuMBvL1r4h+j5atJBwbgXVjzZRz+dehQ1LWTK+1Na8GSQdTNXq46QEaEgLkeqQGDJx gh8Cp8Q1hdG7HQHA4MDYMvpulnls1jgZiDM7lFflIKjzsAiZbuaF3PQ8z5uIWVvnT+FV lsPto6WMIR1hlkTgcsEFePFgE6ulWPYFwXth7gALWqaWHhYY8mrT/DDpVHIC+crZDOqS oA+5cBvl48DSTBWSydiavZBgmddInf845TsG5qeLuAJg7g+eu8HTgc8XdBno7VLn00cO V1Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=b2GVMt2b; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=P3hedTcY; 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 m63si118909iof.60.2020.09.08.11.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:24:04 -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=b2GVMt2b; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=P3hedTcY; 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=b2GVMt2bvB2Wjnx+PQ0me1dKz WAN7n6hIdpRkcH70Qz+UbeMfv9uL+rGylk38EiZ/yqco6BrRyW0c6+VL+2yYIoZyr2i/SK4EPokSm 7JmVEutq4UNTgnOaf0bTO1BHMd3NKOjmUvf1Ad1jucfAIHHgEZwmwcH5tRgk+MQ5X/1p+A//cx7Hk sztJB/NmrpoVi2/93do3whCm/iU6vvyYi7EKcL328stAZ+CDCc2Jr09STgW3PZ+e5WAVCdBd+IgJi nWY5lDFrI94xoV5kgKxSN3Rbe0tZJs6AmCMC9Gi8Oivo6foeasMBk8CQeo4IibiQobQGq9cAcuCV1 vhzIWfH7w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiHh-00053i-Kb; Tue, 08 Sep 2020 18:24:01 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFiHe-000513-3o for wcn36xx@lists.infradead.org; Tue, 08 Sep 2020 18:23:59 +0000 Received: by mail-wm1-x342.google.com with SMTP id k18so291599wmj.5 for ; Tue, 08 Sep 2020 11:23:58 -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=P3hedTcYIXhIoygbLO9ap57mxbcZf4C1cLkaPFU4XqJCSwQr0eJ3Tvu2n+u0/5mvuB L/UIxs6DyWGSGlZTaPOyPiCqr2+241eJzHIzsGBfYDg2upz6V8M2jG103FNGiVL63eL9 FpGreDD0mwbuyM8JaNRhUsV8ueKxJQbeDedC0Rkx9WOu9azu6S+RY3ZWlcbuc+48Xi9q m3kLnNfDfa+cZoVoNJIWM8OslHniy+keNzdY6VOBdMAgEpsOmpKDp50mvF05gLFF97F6 T3J0/CkVrvO7zcLq0ltOTJN6/Ml1ifMa8VDPA42Fp+L1CwBVNU474tBrq9a3DrZ5OJIo kFvQ== 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=iitDsfPTC0eEntELRGEEJASF5WNyqJ+LSqmS+jXsKj7Xv3MXZEiC7GANTp/gvXdmr7 3c/0i9gRNjncCdBMsxPe4E7osfs0Xb9hsVsyXyqhNWv5qBz3bBt1NKiEXPL3IxsZxqgb vzYuJn+45rkT8hUmAQPu6seU1JBKmUYIRglWoPpHHbBmQi8GtY6RyajSeOOp5mG6Sgan YhieMQ7B/TxwFkPX2iUPaNGfVMQOKtnx++nFesEJTz8KHFYpOtEOSOsYPpO+HOUKyVHJ /Z+FwPdxhVy1o+pgaOYhDsAXGfPNgUl/guatYkAzKbsTycJQT0Hha0t17op7di8mcRFQ gIAg== X-Gm-Message-State: AOAM533h5dSV4zhuobNu7lqSD6606N4geaWHDZkDJcqvZftoqbo3e84m dL76r6yMwTUL3jIxbuBEnT3pdQ== X-Received: by 2002:a7b:c1d3:: with SMTP id a19mr368649wmj.19.1599589437298; Tue, 08 Sep 2020 11:23:57 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id k8sm362516wrl.42.2020.09.08.11.23.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 11:23:56 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v3 7/7] wcn36xx: Add wrapper function wcn36xx_smd_set_sta_params_v1() Date: Tue, 8 Sep 2020 19:24:37 +0100 Message-Id: <20200908182437.2870281-8-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_142358_208918_4937BCA2 X-CRM114-Status: GOOD ( 13.59 ) 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:342 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 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,