Message ID | 20230721055305.20420-4-quic_wgong@quicinc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c42c2b8224c40f91f5f4984cc721d33ab10c7d43 |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: ath12k: add support device recovery for WCN7850 | expand |
diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index d0da9b63a114..edc45d78b5d5 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -2535,6 +2535,7 @@ static void ath12k_qmi_m3_free(struct ath12k_base *ab) dma_free_coherent(ab->dev, m3_mem->size, m3_mem->vaddr, m3_mem->paddr); m3_mem->vaddr = NULL; + m3_mem->size = 0; } static int ath12k_qmi_wlanfw_m3_info_send(struct ath12k_base *ab)
This is to fix m3 buffer reuse issue as m3_mem->size isn't set to ZERO in free function, which leads invalid m3 downloading to firmware and firmware crashed. 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> --- drivers/net/wireless/ath/ath12k/qmi.c | 1 + 1 file changed, 1 insertion(+)