]> git.baikalelectronics.ru Git - kernel.git/commit
ath11k: Reuse the available memory after firmware reload
authorAnilkumar Kolli <quic_akolli@quicinc.com>
Mon, 9 May 2022 11:57:32 +0000 (14:57 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 10 May 2022 16:33:33 +0000 (19:33 +0300)
commitbf0efddf8606815b87eb490aec3fd0137545922e
treeafbe4ac8f10b8197588b1de79f6d63a4bdf3df00
parent63810a2819710964b94b4576e08c57870731c4f6
ath11k: Reuse the available memory after firmware reload

Ath11k allocates memory when firmware requests memory in QMI.
Coldboot calibration and firmware recovery uses firmware reload.
On firmware reload, firmware sends memory request again. If Ath11k
allocates memory on first firmware boot, reuse the available
memory. Also check if the segment type and size is same
on the next firmware boot. Reuse if segment type/size is
same as previous firmware boot else free the segment and
allocate the segment with size/type.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00752-QCAHKSWPL_SILICONZ-1

Signed-off-by: Anilkumar Kolli <quic_akolli@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220506141448.10340-1-quic_akolli@quicinc.com
drivers/net/wireless/ath/ath11k/core.c
drivers/net/wireless/ath/ath11k/qmi.c
drivers/net/wireless/ath/ath11k/qmi.h