summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath11k/core.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2020-08-13 12:04:23 +0300
committerKalle Valo <kvalo@codeaurora.org>2020-08-17 13:07:09 +0300
commitb8246f88468440ac596238ff402bcb636053d657 (patch)
treee2be3120e0b174c723735f37c57ef5774247ec63 /drivers/net/wireless/ath/ath11k/core.c
parent5697a564d369412ca988696f43dacad59b5f7efb (diff)
ath11k: implement ath11k_core_pre_init()
This is needed to initialise hw_params before MHI registration starts. MHI needs location of firmware directory and that's delivered via hw_params. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2 Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1597309466-19688-8-git-send-email-kvalo@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/core.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/core.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 2dfbe4276514..5c84995baaf9 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -742,6 +742,20 @@ static int ath11k_init_hw_params(struct ath11k_base *ab)
return 0;
}
+int ath11k_core_pre_init(struct ath11k_base *ab)
+{
+ int ret;
+
+ ret = ath11k_init_hw_params(ab);
+ if (ret) {
+ ath11k_err(ab, "failed to get hw params: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL(ath11k_core_pre_init);
+
int ath11k_core_init(struct ath11k_base *ab)
{
struct device *dev = ab->dev;
@@ -761,12 +775,6 @@ int ath11k_core_init(struct ath11k_base *ab)
}
ab->tgt_rproc = prproc;
- ret = ath11k_init_hw_params(ab);
- if (ret) {
- ath11k_err(ab, "failed to get hw params %d\n", ret);
- return ret;
- }
-
ret = ath11k_core_soc_create(ab);
if (ret) {
ath11k_err(ab, "failed to create soc core: %d\n", ret);