From patchwork Wed Sep 9 15:37:16 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: 249495 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp524689ilg; Wed, 9 Sep 2020 08:36:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEkIN1ZTNPkD9pwUCQZTFT0homKHFCLVycCMMm/KbOVzti9XC3j6qWYYTm+9sdTPcJvdl/ X-Received: by 2002:a5d:80c6:: with SMTP id h6mr3808609ior.2.1599665798891; Wed, 09 Sep 2020 08:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599665798; cv=none; d=google.com; s=arc-20160816; b=ymLX9VLdyO0dYjEi3Fgi8APL0I0q+U8yLnq0hbYckFkqy+Sd9KS1DVOpzdRD/O1p4J 6GZ+xHEwxnxIeDEpgltkZBsmTVk7cdI0h22QaAHkpf02lInyBW/mKHcJflrG5AayuZHB dQ4BZ/VtltoVPh84t4w9Dcl5EMFT5m7YaM1dmxXgT8XZkJeckO9Eheo9nCitqyI0Lu8q ooQcjUFHlht3CLhbFQl8wDXxLltnH1Fz7je2Hn+OuU+5mXA7Jx3fji5zE8Qzar+RpkQI uDOtqyRiscipbn2SOShbsjiWvZ2U/+MFv5kRfF5G62/z3DezNWJC7E6jmunG3a7Ko7WT C2AA== 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=/Ucmr6JhbfhAvxMEE7wHPvTXby2TCrlXYKwqR0NDB9g=; b=H1uSOYiZPgBJZfGwp+3C1rerIunUUlcMnhJd4rWKEG7PN8StIExTwegn0eFQh63fTX kUB+Cr7c8hKMPbNQ31gfmNqY4UAPat6zRAXTcuOw0eSxOIqZkGOyTBujys7krAX073WR I4wc32HgIaXrP35WOf09mM/pOcanSadmKYs8UMry/grejMliMa2uw2iY+CNdkgWXdn4L hgw0aqIiQCklmZ9kv/AvIbA/ovTKvLUDoMZUIi8N/axsAU6oweiEMe5vBPKAAsOBISNt fKxbnz2IYq2TRYoO458igVKfvoNPuESJsU9HTfm3BeK7Z0mBBF4kF0+QRWII8amWa50A BWYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=merlin.20170209 header.b=dEMbZY9s; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qoVAGYgv; 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 l67si2317220iof.32.2020.09.09.08.36.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:38 -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=dEMbZY9s; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qoVAGYgv; 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=/Ucmr6JhbfhAvxMEE7wHPvTXby2TCrlXYKwqR0NDB9g=; b=dEMbZY9sSZ8CBfH4x6flojzdH 1MuTLAOJP0o585A9pK6bSZzykDoehIp+ad7chebXrNycEo1hbwp2vvuUKSczbnuTQ62fsMdYO8jki dxjHm58BJec5mL5gCq/1dogjUU/Rh9omJL1Sj95V7o0RqDqaldTxR7iqFpQ/RXSSTFMCYm6/RYuAO 4desUbBYYvhOhox5n8qxrYH2e2ucjI2crpU1IjdmUlPEBrMY+CqH0oErt6KOGy2MinR1bJo18/XcZ hp/8cYcksDrkDhnbuwa+HWu8rddm9xDOrekH8D0+BL3QVtIGnPqXu57gsrtpBT0GFY73A39TGoWTO MzyfjYFEg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kG29D-0006hR-VR; Wed, 09 Sep 2020 15:36:36 +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 1kG29B-0006g1-RX for wcn36xx@lists.infradead.org; Wed, 09 Sep 2020 15:36:34 +0000 Received: by mail-wr1-x441.google.com with SMTP id z1so3469333wrt.3 for ; Wed, 09 Sep 2020 08:36: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=AiC0FgF4uDyeVnKed9OyzjxTSydZd0n83LrPDKGnIx0=; b=qoVAGYgvJAXzaNyItH/D1xYCzbVYiKWjlxjPjxREKvVdKi5C23Bb3/5oVuR9XU7Rx+ TpaqpjGvbTgnicv/WxgfBBqAwuyKga+YIaQEYd0moB91WRg1PCyAqB01ClCOrhtZllYs qMqPgFJS84qyVW1GJcJSa9uDOC8Zquj6t/dSMRHXxNKtpWNLs8FPszlvUJD+iSaR2XhN yOh/UOyFvu5Jb4rEQkV8Pb+3EFbsJ1H5YWNXA4T/DhnTZgz859slr4U4CCt5JPOW2eHN c42iOWexbkDYKsUIgicDFELTCbCE/mHg9BhoUV7cBlhjJNAlBVOo1aCdRdZ1AeIZKtQQ 1h6w== 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=AiC0FgF4uDyeVnKed9OyzjxTSydZd0n83LrPDKGnIx0=; b=T9ScbHDz5fKTErke90fwJ2GBzQTSbHexUsaNWdTvG7SK1jFbHmS4Ce4ewZc036HbKF NNIvasexKEvpsa+KUrqrZa07p8BHufa9zbXnQ4PekLtVtUEfpG6EEhlWvcD/XEewZ0na sXPqjnG6c8dGTo4Ugr0JdQyV1vAceSapl1tM85DsHFDj+PK6F5XGZ3ZbkUHTUJoVV54g ANIqkH8g/9BoQ3Wei9B890Ev47uh46hWpWCbrQ63p2kmxMmxIuSwxft5sATr9b+zolNR KuhK/gIIVsxMYBsumlim4K2EYFLGWo2l0CvFHBjDxCmFX97aVLEBL44szu9Q/YzWuYWJ kXSQ== X-Gm-Message-State: AOAM532s+bI31YVaha3TGKzqZBWFtRdNlVhyAWHbLbMLMuVlcTLM/sx2 Dm8GB+pCPac467J9BdJnY7A2zyt8uPJVzA== X-Received: by 2002:adf:e449:: with SMTP id t9mr4668564wrm.154.1599665792826; Wed, 09 Sep 2020 08:36:32 -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 m185sm4605220wmf.5.2020.09.09.08.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2020 08:36:32 -0700 (PDT) From: Bryan O'Donoghue To: kvalo@codeaurora.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v4 3/4] wcn36xx: Add ability to download wcn3680 specific firmware parameters Date: Wed, 9 Sep 2020 16:37:16 +0100 Message-Id: <20200909153717.2905037-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200909153717.2905037-1-bryan.odonoghue@linaro.org> References: <20200909153717.2905037-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_113633_895348_66296CAB X-CRM114-Status: GOOD ( 13.21 ) 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_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 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 fda2fa0339d9..6805de3f58e7 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -612,6 +612,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); @@ -624,9 +626,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; }