For a target memory segment of an unsupported type, ath12k_qmi_alloc_target_mem_chunk() warns, clears the DMA address in chunk->paddr and keeps the requested size. The response then carries address 0 with a non-zero size for that segment. QCN9274 firmware WLAN.WBE.1.6-01243 requests such a segment at every boot: type 0xa (QMI_WLFW_AFC_MEM_V01), 8 KiB for an Automated Frequency Coordination response, which ath12k does not support: ath12k_wifi7_pci 0000:06:00.0: memory type 10 not supported The firmware treats a non-zero size as a provided region and maps the given address. Nothing visible follows with this firmware: memory ready, firmware ready and all radios come up with or without this change. The response is still wrong, since it claims a region the host did not provide. Clear the size as well, so that an unsupported type is answered with address 0 and size 0, which the firmware treats as not provided. The warning is unchanged. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Signed-off-by: Goran Sustek --- v3: size cleared in the default case, no AFC case; warning kept; message reworded (Rameshkumar Sundaram) v2: no allocation, size 0 (Rameshkumar Sundaram) drivers/net/wireless/ath/ath12k/qmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c index 52a925fc44ee..4aaee5870ae9 100644 --- a/drivers/net/wireless/ath/ath12k/qmi.c +++ b/drivers/net/wireless/ath/ath12k/qmi.c @@ -2792,6 +2792,7 @@ static int ath12k_qmi_alloc_target_mem_chunk(struct ath12k_base *ab) chunk->type); chunk->paddr = 0; chunk->v.addr = NULL; + chunk->size = 0; break; } } -- 2.56.0