From patchwork Sat Aug 29 03:40:01 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: 248703 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1603038ilg; Fri, 28 Aug 2020 20:39:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaOva4QBh4YpjitGYC0ttvfuaUquYAv1Y9ZVJMTLyPeLvEDJXrcatOl/F9HskbaFoe2s/l X-Received: by 2002:a02:9149:: with SMTP id b9mr3839064jag.50.1598672366549; Fri, 28 Aug 2020 20:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598672366; cv=none; d=google.com; s=arc-20160816; b=s2pDGhhOX1ovHuVo/OrWSkiSzRVNTOceCZuvTX/4283WR9sZR/6LxeIuDJkB/X0oan Z2U9hXNVifo5W/UIOM8/I/kRtFLi3PdrJAc3/W4MNIEs5abYjkRFlGtV0BwMIakLSEID Vq/A8XlZV56ZHZeGoBoZZmEWdaf3fLhIbM1slJjcvQyhJLpaoWks/AmFWAAOtJJpsSyy GTVVTXbLeR1up4fskM+ppPGkrBlg9JIwhmI6QJ/YZnEnOwn0GKjsqf8EgfYPP94+C3RG A1030WVXpszuu5i6SD3+MFXKCevgLhx8TmW/wt1+bbo4XMB6lc30i9o/fJw+iDgTgiQh D07w== 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=LOf9Ar9nyRQP331BGyOzNwR9QF6HLdHf3ZNodoiYaII=; b=TY/9DarjEGy68UMAjjys3heQ6/fkIT/b57Z5XBvU1hhuScd9eGl73RmMsMgzdPmxxD MlYyQBfc5DbdSIBiao9JplaIpgD+o/Zc52RAMDWnwiUcznIu1gMEyoGx7ZlObdEsIQ4A tlyE7zQ1bjyucFrWS8kIwyGQSwNv3kkkmEZAcjY2eAKQeG3xsIyteIf0iW63P0IRXNmf p/JP8Z8EKmZ7Qs3+oUD13vb1zDbeNEL9NqOYz+CiwA7FFFfRLrNQnIR8t9vso0Qmmqs8 IwMlfpaZGo0bPbPJGz6LoF0NUVK6pwlyPe/nwNfBM6xV7CyPT7Jj72xw1qbilBjrbz6S h4Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b="1b//nLeC"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fnd4teTt; 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 y4si1114571ila.93.2020.08.28.20.39.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:26 -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="1b//nLeC"; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fnd4teTt; 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=LOf9Ar9nyRQP331BGyOzNwR9QF6HLdHf3ZNodoiYaII=; b=1b//nLeCkGAnTtF1vE1bR63AR i/pPNiU7n4Cduo2zPDwchamLzr30ccbjmWKrb8tr9Bv1T3uTAg7MVUehy7omAZVpROwRnA8TcxnfD Ip8lk8W/XOIU3TGbEWW6BVdOrAairJMfVYBmIq4wG1rQQ5DMxz5FnIDeoge/DOLDtfxYFYDP5yKvu jPnOy3S4RfDy9Qsf5aVXd1Ke+aZQCCa8ivSohMdJ9mq978wD76IzEh3e1XxeDXUF3Lrz/zlywJJWD F3LPq2HKTU45a/x0viDuUPFUQWamf+X5Hbgch59HIMbAWz8TiQP32Q4OC3nV+KSuVv253SCqb1XkK SEtq2zANA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBri7-0002hq-In; Sat, 29 Aug 2020 03:39:23 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBri3-0002fy-NC for wcn36xx@lists.infradead.org; Sat, 29 Aug 2020 03:39:21 +0000 Received: by mail-wr1-x443.google.com with SMTP id b18so873289wrs.7 for ; Fri, 28 Aug 2020 20:39:19 -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=mBPSamWvTI8jSIxlpjkAWuODo8a6eVtbug19TSHtbA0=; b=fnd4teTtsXaDTK5YTab+19NYzem1hkFE+V6UKgWIUleTHs8xHmUAEvol59niuWh+qM ma7Y35ApH+GxlbmU96FMfZsy9aZ7rT0lWn/RnS5Z1tT+1VVfEGSRIyQRDePqSHjS4BwX OWJrxAOwXNEwZBLUmLLqiMZhoFqozUlcU1a6eLkrvO8hzh/C5YTZC6d9qniTT1HcZNYP Y45RQWVLx/XcgUGrO+J+2oj4UphCv+2ip6V10alQbkKWzWWN9Pl0fC2zAux9JSdNZYm3 IRdv3Y2iJkc7TZyc2QGu2A4IklqdbogJjnCkmesLjCHpEw6d8FJt8NHNSnEvqP9OCFZ1 x9Aw== 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=mBPSamWvTI8jSIxlpjkAWuODo8a6eVtbug19TSHtbA0=; b=AhZRrdVVxU9cbYwNM/cpZuCN9jbGFrLSuuUmIphM7Pa4h5r5Kcd8RlMW0DL4D66+qw XVtJjk14Gg0txrHY0HA0KRjDl9KqLOCKRXElTnDVsY8UYA4hkCayFI3QfDZSAC5i8j29 bmUUiikuAu6Un4pnzrB7mO1MJg80NK0CiQA3T/D4p7uW3B/RsC5/M9JQYbl+kwyxasyl vPQ4YufWcr0MFHKTN/pt1fNqRVl2mJFlv0L+jyRldLlWhuw+oEzWYCI/BO9LyRBZBAHK onQ5MwBWLBVlQMwULXEFUgt7YR8Q4wgCPD7loexrLidup/xhwlcaH1Tpnj6Y8W8Uh38j lxmA== X-Gm-Message-State: AOAM530FVr8I226+dzdLgdjmV9tMSVUSG/u7/znff0yU3Gu+x1e7/o7E sHZexVyCAIQFtG9HTe1tUUraZw== X-Received: by 2002:adf:9ed1:: with SMTP id b17mr1705289wrf.227.1598672358848; Fri, 28 Aug 2020 20:39:18 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id v3sm1735083wmh.6.2020.08.28.20.39.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 20:39:18 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2 3/4] wcn36xx: Add ability to download wcn3680 specific firmware parameters Date: Sat, 29 Aug 2020 04:40:01 +0100 Message-Id: <20200829034002.2167878-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200829034002.2167878-1-bryan.odonoghue@linaro.org> References: <20200829034002.2167878-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_233920_713052_7C9CA6F0 X-CRM114-Status: GOOD ( 14.15 ) 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:443 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 modifies wcn36xx_smd_start() so that it can download wcn3680 specific firmware parameters if we are talking to the wcn3680. If not the original generic firmware parameter table should continue to be used for wcn3620 and wcn3660. Signed-off-by: Bryan O'Donoghue --- drivers/net/wireless/ath/wcn36xx/smd.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -- 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 b19c83b93cd8..3785931d3df6 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -616,6 +616,8 @@ int wcn36xx_smd_start(struct wcn36xx *wcn) int ret; int i; size_t len; + int cfg_elements; + static struct wcn36xx_cfg_val *cfg_vals; mutex_lock(&wcn->hal_mutex); INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_REQ); @@ -628,9 +630,17 @@ int wcn36xx_smd_start(struct wcn36xx *wcn) body = (struct wcn36xx_hal_mac_start_req_msg *)wcn->hal_buf; len = body->header.len; - for (i = 0; i < ARRAY_SIZE(wcn36xx_cfg_vals); i++) { - ret = put_cfg_tlv_u32(wcn, &len, wcn36xx_cfg_vals[i].cfg_id, - wcn36xx_cfg_vals[i].value); + if (wcn->rf_id == RF_IRIS_WCN3680) { + cfg_vals = wcn3680_cfg_vals; + cfg_elements = ARRAY_SIZE(wcn3680_cfg_vals); + } else { + cfg_vals = wcn36xx_cfg_vals; + cfg_elements = ARRAY_SIZE(wcn36xx_cfg_vals); + } + + for (i = 0; i < cfg_elements; i++) { + ret = put_cfg_tlv_u32(wcn, &len, cfg_vals[i].cfg_id, + cfg_vals[i].value); if (ret) goto out; }