Re: [PATCH ath-next v2 1/2] wifi: ath12k: report no AFC memory region to firmware

From: Rameshkumar Sundaram

Date: Tue Nov 03 2026 - 00:17:40 EST


On 11/3/2026 1:32 AM, Goran Sustek wrote:
QCN9274 firmware WLAN.WBE.1.6-01243 requests a target memory segment of
type 0xa at every boot. The driver does not know this type, so it logs

ath12k_wifi7_pci 0000:06:00.0: memory type 10 not supported

and answers the request with a NULL address but the requested size.

Type 0xa is the AFC region: QMI_WLFW_AFC_MEM_V01 = 10 in Qualcomm's
wlan_firmware_service_v01.h. The firmware asks for 8 KiB, where the
host places the response of an Automated Frequency Coordination server
for 6 GHz Standard Power operation. ath12k does not support AFC.

The firmware treats a region as provided whenever its size is non-zero;
it does not check the address. With the current answer it therefore
takes bus address 0 as its AFC region and maps it for its own use.

What do you mean by "bus address" here? Do you mean the DMA address provided in chunk->paddr?

Also, the paragraph below makes it sound like without this change the firmware doesn't send the memory ready indication and the radios don't come up, which isn't the case. There is no visible functional issue being fixed here. Please update the commit message to precisely describe what changes with this patch.


Name the type and answer it with size 0, so that the firmware sees no
AFC region, and log this at debug level instead of warning. No memory
is allocated. With this answer the firmware sends the memory ready
indication, reaches firmware ready and brings up all radios.

Tested as part of the series.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1
Signed-off-by: Goran Sustek <gsustek@xxxxxxxxx>
---
v2: do not allocate the region; answer with size 0 and log at debug
level. New subject. (Rameshkumar Sundaram)

drivers/net/wireless/ath/ath12k/qmi.c | 12 ++++++++++++
drivers/net/wireless/ath/ath12k/qmi.h | 1 +
2 files changed, 13 insertions(+)

diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
index 817bd820623d..55952da4343b 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.c
+++ b/drivers/net/wireless/ath/ath12k/qmi.c
@@ -2755,6 +2755,18 @@ static int ath12k_qmi_alloc_target_mem_chunk(struct ath12k_base *ab)
if (ret)
goto err;
break;
+ case AFC_REGION_TYPE:
+ /* The host does not support AFC. Firmware treats a
+ * region with a non-zero size as provided, so report
+ * size 0 instead of address 0 with the requested size.
+ */
+ ath12k_dbg(ab, ATH12K_DBG_QMI,
+ "qmi AFC memory region of %u B not provided\n",
+ chunk->size);
+ chunk->paddr = 0;
+ chunk->v.addr = NULL;
+ chunk->size = 0;
+ break;

I'd rather move chunk->size = 0 to the default: case. That way, all unsupported memory region types are consistently reported with size 0.

case MLO_GLOBAL_MEM_REGION_TYPE:
mlo_size += chunk->size;
if (ag->mlo_mem.mlo_mem_size &&
diff --git a/drivers/net/wireless/ath/ath12k/qmi.h b/drivers/net/wireless/ath/ath12k/qmi.h
index 1b1c88906f1e..9d9174c6ee60 100644
--- a/drivers/net/wireless/ath/ath12k/qmi.h
+++ b/drivers/net/wireless/ath/ath12k/qmi.h
@@ -177,6 +177,7 @@ enum ath12k_qmi_target_mem {
CALDB_MEM_REGION_TYPE = 0x4,
MLO_GLOBAL_MEM_REGION_TYPE = 0x8,
PAGEABLE_MEM_REGION_TYPE = 0x9,
+ AFC_REGION_TYPE = 0xa,
LPASS_SHARED_V01_REGION_TYPE = 0xb,
};


--
Ramesh