1: 3fdbe876f648 < -: ------------ wifi: ath12k: allocate the AFC memory region requested by firmware -: ------------ > 1: ce5d358e2d9c wifi: ath12k: report no AFC memory region to firmware 2: 81d05e889338 ! 2: 6389719dee9c wifi: ath12k: skip unknown direct buffer ring module IDs @@ Metadata ## Commit message ## wifi: ath12k: skip unknown direct buffer ring module IDs  - Newer firmware may advertise direct buffer rings for modules the - driver does not know. QCN9274 firmware WLAN.WBE.1.6-01243 lists - module 2, and ath12k_wmi_dma_ring_caps() treats it as fatal: + QCN9274 firmware WLAN.WBE.1.6-01243 advertises direct buffer rings for + module IDs 2 (CV upload) and 3 (Wi-Fi radar), one entry per radio. + ath12k_wmi_dma_ring_caps() treats any ID at or above + WMI_DIRECT_BUF_MAX as fatal:  ath12k_wifi7_pci 0000:06:00.0: Invalid module id 2 ath12k_wifi7_pci 0000:06:00.0: failed to parse tlv -22 @@ Commit message rest of the service ready ext event. Initialisation continues only because the service ready ext2 event completes it.  - Skip unknown module IDs with a debug message instead; the driver only - sets up rings for the modules it implements. Store the accepted - entries contiguously and set num_db_cap to the number actually stored: - ath12k_wmi_alloc_dbring_caps() zero-fills the array, so a hole left at - the index of a skipped entry would read as a spectral ring with zero - sizes. + An unknown ID is not an error. The firmware uses a direct buffer ring + only after the host configures it with WMI_PDEV_DMA_RING_CFG_REQ_CMDID, + and the host does that only for a feature it implements. Skip unknown + module IDs with a debug message instead.  - Tested as part of the series. + Store the accepted entries contiguously and set num_db_cap to the + number actually stored. ath12k_wmi_alloc_dbring_caps() zero-fills the + array, so a skipped entry left in place would read as a spectral ring + with zero sizes. No code reads db_caps today, but a future spectral + user would.  + This follows Nazar Mokrynskyi's earlier version, with the separate + count of stored entries that Jeff Johnson suggested in its review. + + Link: https://lore.kernel.org/linux-wireless/20260505172415.566328-3-nazar@mokrynskyi.com/ + Suggested-by: Jeff Johnson  Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Signed-off-by: Goran Sustek   @@ drivers/net/wireless/ath/ath12k/wmi.c: static int ath12k_wmi_dma_ring_caps(struc  - goto free_dir_buff;  + module_id = le32_to_cpu(dma_caps[i].module_id);  + -+ /* Newer firmware may advertise rings for modules this driver -+ * does not know yet. Skip them; the driver only sets up rings -+ * for the modules it implements. ++ /* Firmware may advertise rings for modules this driver ++ * does not implement. It uses a ring only after the host ++ * configures it, so skipping the entry is safe.  + */  + if (module_id >= WMI_DIRECT_BUF_MAX) {  + ath12k_dbg(ab, ATH12K_DBG_WMI, 3: a80f93b81f35 < -: ------------ wifi: ath12k: name direct buffer ring modules 2 and 3