diff options
author | Wen Gong <quic_wgong@quicinc.com> | 2023-10-10 09:27:21 +0200 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2023-10-12 18:06:29 +0200 |
commit | 92448f8718baf8a8a940c210f04d0787a52e7507 (patch) | |
tree | 304bd7eaa08799d560738b6bb4c8565bd46077fb /drivers/net/wireless | |
parent | wifi: ath12k: configure RDDM size to MHI for device recovery (diff) | |
download | linux-92448f8718baf8a8a940c210f04d0787a52e7507.tar.xz linux-92448f8718baf8a8a940c210f04d0787a52e7507.zip |
wifi: ath12k: add ath12k_qmi_free_resource() for recovery
ath12k_qmi_free_target_mem_chunk() and ath12k_qmi_m3_free() is static
in qmi.c, they are needed for recovery, export them in a new function
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230721055305.20420-3-quic_wgong@quicinc.com
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath12k/core.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath12k/qmi.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath12k/qmi.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index c68750cb3c4d..94857100414d 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -960,6 +960,7 @@ static void ath12k_core_reset(struct work_struct *work) ATH12K_RECOVER_START_TIMEOUT_HZ); ath12k_hif_power_down(ab); + ath12k_qmi_free_resource(ab); ath12k_hif_power_up(ab); ath12k_dbg(ab, ATH12K_DBG_BOOT, "reset started\n"); diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index fd1bf53c2502..b00d74724aa9 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -3093,3 +3093,9 @@ void ath12k_qmi_deinit_service(struct ath12k_base *ab) ath12k_qmi_m3_free(ab); ath12k_qmi_free_target_mem_chunk(ab); } + +void ath12k_qmi_free_resource(struct ath12k_base *ab) +{ + ath12k_qmi_free_target_mem_chunk(ab); + ath12k_qmi_m3_free(ab); +} diff --git a/drivers/net/wireless/ath/ath12k/qmi.h b/drivers/net/wireless/ath/ath12k/qmi.h index 15944f5f33ab..e20d6511d1ca 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.h +++ b/drivers/net/wireless/ath/ath12k/qmi.h @@ -564,5 +564,6 @@ int ath12k_qmi_firmware_start(struct ath12k_base *ab, void ath12k_qmi_firmware_stop(struct ath12k_base *ab); void ath12k_qmi_deinit_service(struct ath12k_base *ab); int ath12k_qmi_init_service(struct ath12k_base *ab); +void ath12k_qmi_free_resource(struct ath12k_base *ab); #endif |