devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konrad.dybcio@linaro.org>,
	 Loic Poulain <loic.poulain@linaro.org>,
	Kalle Valo <kvalo@kernel.org>,
	 Mathieu Poirier <mathieu.poirier@linaro.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
	 linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
	 Arnd Bergmann <arnd@arndb.de>,
	 Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: [PATCH 02/12] wifi: wcn36xx: make use of QCOM_FW_HELPER
Date: Tue, 21 May 2024 12:45:22 +0300	[thread overview]
Message-ID: <20240521-qcom-firmware-name-v1-2-99a6d32b1e5e@linaro.org> (raw)
In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org>

Make the driver use qcom_fw_helper to autodetect the path to the
calibration data file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/net/wireless/ath/wcn36xx/Kconfig | 1 +
 drivers/net/wireless/ath/wcn36xx/main.c  | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/Kconfig b/drivers/net/wireless/ath/wcn36xx/Kconfig
index 5832c7ef9352..90239c89676a 100644
--- a/drivers/net/wireless/ath/wcn36xx/Kconfig
+++ b/drivers/net/wireless/ath/wcn36xx/Kconfig
@@ -4,6 +4,7 @@ config WCN36XX
 	depends on MAC80211 && HAS_DMA
 	depends on QCOM_WCNSS_CTRL || QCOM_WCNSS_CTRL=n
 	depends on RPMSG || RPMSG=n
+	select QCOM_FW_HELPER
 	help
 	  This module adds support for wireless adapters based on
 	  Qualcomm Atheros WCN3660 and WCN3680 mobile chipsets.
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index e760d8002e09..8d25db81c1d0 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -22,6 +22,7 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/rpmsg.h>
+#include <linux/soc/qcom/fw_helper.h>
 #include <linux/soc/qcom/smem_state.h>
 #include <linux/soc/qcom/wcnss_ctrl.h>
 #include <net/ipv6.h>
@@ -1609,6 +1610,10 @@ static int wcn36xx_probe(struct platform_device *pdev)
 		goto out_wq;
 	}
 
+	wcn->nv_file = devm_qcom_get_board_fw(wcn->dev, wcn->nv_file);
+	if (!wcn->nv_file)
+		return -ENOMEM;
+
 	wcn->smd_channel = qcom_wcnss_open_channel(wcnss, "WLAN_CTRL", wcn36xx_smd_rsp_process, hw);
 	if (IS_ERR(wcn->smd_channel)) {
 		wcn36xx_err("failed to open WLAN_CTRL channel\n");

-- 
2.39.2


  parent reply	other threads:[~2024-05-21  9:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-21  9:45 [PATCH 00/12] arm64: qcom: autodetect firmware paths Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 01/12] soc: qcom: add firmware name helper Dmitry Baryshkov
2024-05-21  9:52   ` neil.armstrong
2024-05-21 10:01     ` Dmitry Baryshkov
2024-05-21 11:20       ` Kalle Valo
2024-05-21 13:08         ` Dmitry Baryshkov
2024-05-22 22:48           ` Bjorn Andersson
2024-05-27 11:42             ` Dmitry Baryshkov
2024-05-29  2:28               ` Bjorn Andersson
2024-05-31 18:48                 ` Kalle Valo
2024-05-21  9:45 ` Dmitry Baryshkov [this message]
2024-05-31 18:53   ` [PATCH 02/12] wifi: wcn36xx: make use of QCOM_FW_HELPER Kalle Valo
2024-05-21  9:45 ` [PATCH 03/12] soc: qcom: wcnss_ctrl: " Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 04/12] remoteproc: qcom_q6v5_mss: switch to mbn files by default Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 05/12] remoteproc: qcom_q6v5_mss: make use of QCOM_FW_HELPER Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 06/12] remoteproc: qcom_q6v5_pas: switch to mbn files by default Dmitry Baryshkov
2024-05-21  9:49   ` neil.armstrong
2024-05-21 10:01     ` Dmitry Baryshkov
2024-05-21 19:40     ` Bjorn Andersson
2024-05-21  9:45 ` [PATCH 07/12] remoteproc: qcom_q6v5_pas: make use of QCOM_FW_HELPER Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 08/12] remoteproc: qcom_wcnss: switch to mbn files by default Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 09/12] remoteproc: qcom_wcnss: make use of QCOM_FW_HELPER Dmitry Baryshkov
2024-05-22 19:21   ` Jeff Johnson
2024-05-22 20:42     ` Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 10/12] " Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 11/12] arm64: dts: qcom: apq8016-sbc: drop firmware-name properties Dmitry Baryshkov
2024-05-21  9:45 ` [PATCH 12/12] arm64: dts: qcom: apq8096-db820c: " Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240521-qcom-firmware-name-v1-2-99a6d32b1e5e@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzk+dt@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=robh@kernel.org \
    --cc=wcn36xx@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).