wifi: ath12k: add ath12k_qmi_free_resource() for recovery
authorWen Gong <quic_wgong@quicinc.com>
Tue, 10 Oct 2023 07:27:21 +0000 (10:27 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 12 Oct 2023 16:06:29 +0000 (19:06 +0300)
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
drivers/net/wireless/ath/ath12k/core.c
drivers/net/wireless/ath/ath12k/qmi.c
drivers/net/wireless/ath/ath12k/qmi.h

index c68750cb3c4db7a272eff969ceadad9e58323bec..94857100414d5efbf2d0b5b080ab5a451bb28234 100644 (file)
@@ -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");
index fd1bf53c25023f2051d8b69e228b143d0819927e..b00d74724aa947067100f24c8836253d2d3242e1 100644 (file)
@@ -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);
+}
index 15944f5f33ab0ef5c989b7848bea38687e2e6e4c..e20d6511d1ca04e411b1b1f044a5290c1e388930 100644 (file)
@@ -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