From: sashiko-bot@kernel.org
To: "Madhavan Ganesan" <madhavan.ganesan@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH ath-next v3 04/15] wifi: ath12k: add QMI support for extended firmware binary download
Date: Wed, 18 Nov 2026 08:35:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-220459@kernel.org> (raw)
In-Reply-To: <20261118-wifi8_qcn9575_bringup-v3-4-9875d2a3953f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] wifi: ath12k: missing support check in
ath12k_qmi_request_target_cap()
--
commit b62a5385a0a47e4923666ed9960fe59adf7da8de
Author: Madhavan Ganesan <madhavan.ganesan@oss.qualcomm.com>
wifi: ath12k: add QMI support for extended firmware binary download
This commit adds QMI support for downloading multiple firmware binaries
(M3, AUX uC, and MCSS uC) in a single combined request on devices such
as QCN9575.
> diff --git a/drivers/net/wireless/ath/ath12k/qmi.c b/drivers/net/wireless/ath/ath12k/qmi.c
> index 69512b82aa3b3..3b60d624b0aa5 100644
> --- a/drivers/net/wireless/ath/ath12k/qmi.c
> +++ b/drivers/net/wireless/ath/ath12k/qmi.c
[ ... ]
> @@ -3115,6 +3289,27 @@ int ath12k_qmi_request_target_cap(struct ath12k_base *ab)
> }
> }
>
> + if (resp.ext_fw_bin_download_support_valid &&
> + resp.ext_fw_bin_download_bitmap_valid) {
> + ab->qmi.ext_fw_bin_download_bitmap =
> + resp.ext_fw_bin_download_bitmap;
> + ath12k_dbg(ab, ATH12K_DBG_QMI, "qmi extended firmware bin download bitmap 0x%x\n",
> + resp.ext_fw_bin_download_bitmap);
> +
> + if (ab->qmi.ext_fw_bin_download_bitmap &
> + ~QMI_WLANFW_EXT_FW_BIN_TYPE_HOST_SUPPORTED_MASK) {
> + ath12k_warn(ab, "Invalid ext_fw_bin_download_bitmap 0x%x, host-unsupported bits set\n",
> + ab->qmi.ext_fw_bin_download_bitmap);
> + ret = -EINVAL;
> + goto out;
> + }
> + ab->qmi.ext_fw_bin_download_support = !!resp.ext_fw_bin_download_support;
> + ath12k_dbg(ab, ATH12K_DBG_QMI, "qmi extended firmware bin download supported\n");
> + } else {
> + ab->qmi.ext_fw_bin_download_support = false;
> + ab->qmi.ext_fw_bin_download_bitmap = 0;
> + }
[Severity: Medium]
Should the condition here also check resp.ext_fw_bin_download_support and
that resp.ext_fw_bin_download_bitmap is non-zero?
qmi_decode() sets ext_fw_bin_download_support_valid whenever TLV 0x2B is
present in QMI_WLANFW_CAP_RESP_V01, even if ext_fw_bin_download_support is
0. When both TLVs are present with ext_fw_bin_download_support == 0, this
branch populates ab->qmi.ext_fw_bin_download_bitmap instead of clearing it,
fails capability negotiation with -EINVAL if the unused bitmap has any bits
outside QMI_WLANFW_EXT_FW_BIN_TYPE_HOST_SUPPORTED_MASK, and logs that
extended download is supported while setting ext_fw_bin_download_support to
false. Conversely, if ext_fw_bin_download_support is non-zero with a zero
bitmap, validation passes here and only fails later in
ath12k_qmi_wlanfw_ext_fw_bin_mem_info_send() after BDF files are already
loaded.
Also, if a subsequent ath12k_qmi_request_target_cap() call during reset
clears ab->qmi.ext_fw_bin_download_support after ext_fw_bin_mem[4..6] have
been allocated, ath12k_qmi_free_fw_bin_mem() will take the legacy branch and
free only m3_mem and aux_uc_mem (union slots 0 and 1), leaking the coherent
DMA buffers in ext_fw_bin_mem[4..6].
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118-wifi8_qcn9575_bringup-v3-0-9875d2a3953f@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-11-18 8:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 8:15 [PATCH ath-next v3 00/15] wifi: ath12k: add initial Wi-Fi 8 support for QCN9575 Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 01/15] dt-bindings: net: wireless: add ath12k wifi device QCN9575 Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 02/15] wifi: ath12k: refactor PCI window selection to per-device layout Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 03/15] wifi: ath12k: add extended QMI WLAN cfg for CE and service pipes Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 04/15] wifi: ath12k: add QMI support for extended firmware binary download Madhavan Ganesan
2026-11-18 8:35 ` sashiko-bot [this message]
2026-11-18 8:15 ` [PATCH ath-next v3 05/15] wifi: ath12k: add Wi-Fi 8 directory and base module scaffolding Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 06/15] wifi: ath12k: add initial Wi-Fi 8 hw params and init helper for QCN9575 Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 07/15] wifi: ath12k: add Wi-Fi 8 HAL register table and hal init hook " Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 08/15] wifi: ath12k: add Wi-Fi 8 HAL ops and descriptor definitions " Madhavan Ganesan
2026-11-18 8:33 ` sashiko-bot
2026-11-18 8:15 ` [PATCH ath-next v3 09/15] wifi: ath12k: add unified firmware image support " Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 10/15] wifi: ath12k: add Wi-Fi 8 MHI config " Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 11/15] wifi: ath12k: add Wi-Fi 8 CE config and service pipe map " Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 12/15] wifi: ath12k: add Wi-Fi 8 WMI init " Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 13/15] wifi: ath12k: add Wi-Fi 8 hw ops " Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 14/15] wifi: ath12k: add and hook Wi-Fi 8 mac80211 ops skeleton " Madhavan Ganesan
2026-11-18 8:15 ` [PATCH ath-next v3 15/15] wifi: ath12k: add Wi-Fi 8 PCI driver scaffolding " Madhavan Ganesan
2026-11-18 8:31 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-220459@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=madhavan.ganesan@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox