]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ath11k: fix invalid m3 buffer address
authorCarl Huang <quic_cjhuang@quicinc.com>
Mon, 14 Feb 2022 17:53:16 +0000 (19:53 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 21 Feb 2022 10:05:20 +0000 (12:05 +0200)
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: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220209060012.32478-3-quic_wgong@quicinc.com
drivers/net/wireless/ath/ath11k/qmi.c

index 1144e828cf5cc321fe95d60241ca63eea1ee71f2..d4d831566a894931d0e8a7de00057f2e86163f00 100644 (file)
@@ -2342,6 +2342,7 @@ static void ath11k_qmi_m3_free(struct ath11k_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 ath11k_qmi_wlanfw_m3_info_send(struct ath11k_base *ab)