Message ID | 20200803031132.1427063-37-bryan.odonoghue@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp860784ilo; Sun, 2 Aug 2020 20:11:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUNjiV6TrtZjgjXPiOPU4JzuUE1ao74vcaEa9u+Rzb2GE00SUxIC8a4AnL4AGzsgcExqGm X-Received: by 2002:a17:906:57cc:: with SMTP id u12mr15365663ejr.422.1596424288602; Sun, 02 Aug 2020 20:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596424288; cv=none; d=google.com; s=arc-20160816; b=e7PnjR5IYBZONSyRWqXUcrangquFoL0mqQ+6cgrX1a/3LtuVV8IJ4o/byDTwZr6t2u OtMSULkmQjNOUKDWEnqy45a/h43HjqGOPBOFWikN4bNyHXZsu02lDEwhm1WB5+USEktQ kx2yPvQUZrlWdITj1vbqjur0RDNpFVeIS5wr8Tq5sURZm73ddy8u2RmckKE315sYoS6r /3xOEuvS0RuUWWM/NRllJMLCLWUB1mFbcD1vYJEKPC5D8W+1uib5PHj4i4/Llc+a0XLJ Ad1BvPDxJjhqHg+hVFE8Ebj7QVtsemlvyrw94Ax4rrSDK1EdfrKFePEAlmuYzILVDBR/ U7Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fZoFBHbiMDr3m9OWHf8AVF21Nakmli1eSwjE2dyRsIQ=; b=Tc2DL2odHO2a+NBou0j2hTrrp8nZ/5FFnOB7kBCHe+Eh7acg6M0J1KiAFFyEm5zYSC sBpAJloHI51dgjR+uwn4pMBLY+Bkm03kciBpCNU2w5UITl+c4SCn5j0g69H+/VfRDki1 JUuUusX+9tViHgPEu2JacOoIFA5Fu6e47/l1YE3WMrspPgyygkgK23NLnNb4HUUcgUX9 TzURilFoo4e8OOK42UOLXMz1O2fqscoCGT/1b1yb5G7gxUyAS4x/QYEkA/X2/GO/Qddh PNsQ9wAYwYPaYg0Q8+FcdXqXi5Xffv34P30vfyOesGO2gYrIOKM/IBy6pfJ2joCYigyB +cFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hWXQ530S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-wireless-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e19si9440020edv.165.2020.08.02.20.11.28; Sun, 02 Aug 2020 20:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hWXQ530S; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbgHCDL1 (ORCPT <rfc822;patch@linaro.org> + 2 others); Sun, 2 Aug 2020 23:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727909AbgHCDL0 (ORCPT <rfc822;linux-wireless@vger.kernel.org>); Sun, 2 Aug 2020 23:11:26 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABF05C06174A for <linux-wireless@vger.kernel.org>; Sun, 2 Aug 2020 20:11:25 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id z18so29222610wrm.12 for <linux-wireless@vger.kernel.org>; Sun, 02 Aug 2020 20:11:25 -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=fZoFBHbiMDr3m9OWHf8AVF21Nakmli1eSwjE2dyRsIQ=; b=hWXQ530Suvyx18R5slJjFBMAu5Yu1/M6Hv9gVzKw+P3DYUCEKtmxPH04xYYuDPWyYv VexaJc0nbTMJCZ7nuslAd72+UZ+WTW6jTwqz5EUVNb8ngwtjBNU7r+HtqFdvgrsqIKOv 3zHlD8wtDixB6oycL91C3ryNDjDnY9uZyV862m9vKP4RQ0lcDnFu+EgqNGVRPHlGMv13 SOFTpISuD27v8DNyTZhIPQM4yhIv/Z7eYtGJXPAgtS1agAkbL83gGq+wOnOBB9lLiRt8 YULzjuG2M3rrlwkkmkm8dVw4CPW7Fry/rjLwhOAOpPf1duiKp15T9QPw5yEJK3A64+mc UxDw== 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=fZoFBHbiMDr3m9OWHf8AVF21Nakmli1eSwjE2dyRsIQ=; b=NLXstQL8e+UN1f19xK7uApviRpSi8heqPPJVtt4kxnUXREkNa18jJjKfs+Gk4sX92I YR6ntxHn2v6lc/McpZ0GBnjThgk5Ksw+OUAuPfIBEyF4r5rRDYrjczNC3BHk7XpVQcg6 zmKW5FcTiQxK1FxApffuZnovsv84L7tzox6q9Nd1pg2zF85UUAotzF2WQWEI8TFnOUt5 QwU9gg/NDG7CdQU3wQDzPgEUFjI9R9AHsNEe1DxfmIqCBtwjvdHy2aYKa8YudF17WK40 y/9nI1a3LFxbt7KETLXp1Yl4wIeL6TfBucSJqw0v72tAAYg9D41NDv+F6p4Gpwf15pN0 kr1Q== X-Gm-Message-State: AOAM532r7D/biNNdyPfSTELgitMUSYc0oPZomI4gaUqRb3DRPbys7T6b btpwY+DnsoLoFOrPf+yEslkAaA== X-Received: by 2002:a05:6000:150:: with SMTP id r16mr12875781wrx.63.1596424284449; Sun, 02 Aug 2020 20:11:24 -0700 (PDT) Received: from localhost.localdomain ([176.61.57.127]) by smtp.gmail.com with ESMTPSA id q2sm21956857wro.8.2020.08.02.20.11.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 20:11:23 -0700 (PDT) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: kvalo@codeaurora.org Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, bryan.odonoghue@linaro.org, shawn.guo@linaro.org Subject: [PATCH 36/36] wcn36xx: Add ability to download wcn3680 specific firmware parameters Date: Mon, 3 Aug 2020 04:11:32 +0100 Message-Id: <20200803031132.1427063-37-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> References: <20200803031132.1427063-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: <linux-wireless.vger.kernel.org> X-Mailing-List: linux-wireless@vger.kernel.org |
Series |
wcn36xx: Add support for WCN3680 802.11ac
|
expand
|
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 925d82dc0e88..542c5d160ebe 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -610,6 +610,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); @@ -622,9 +624,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; }
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 <bryan.odonoghue@linaro.org> --- drivers/net/wireless/ath/wcn36xx/smd.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -- 2.27.0