Message ID | 20240521-qcom-firmware-name-v1-2-99a6d32b1e5e@linaro.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
Series | arm64: qcom: autodetect firmware paths | expand |
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> writes: > 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> Not a fan of one sentence commit messages. It would be nice to explain a bit more in the commit message, for instance answering to the question 'why?' and maybe provide a short example how this is supposed to work?
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");
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(+)