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 09/15] wifi: ath12k: add unified firmware image support for QCN9575
Date: Thu, 12 Nov 2026 09:44:19 +0000 [thread overview]
Message-ID: <sashiko-outbox-210895@kernel.org> (raw)
In-Reply-To: <20261112-wifi8_qcn9575_bringup-v1-9-3f30fbc2bb69@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Medium] wifi: ath12k: memory leak of mhi_ctrl->irq in
ath12k_mhi_register() [1]
--
commit 7e637beba6af9aa8998e9035d9033a359dbfb287
Author: Madhavan Ganesan <madhavan.ganesan@oss.qualcomm.com>
wifi: ath12k: add unified firmware image support for QCN9575
This commit adds unified firmware image support for QCN9575 by caching the
OTP board ID in ath12k_mhi_register() and writing it to a PCIe scratch
register with readback verification in ath12k_pci_power_up().
> diff --git a/drivers/net/wireless/ath/ath12k/mhi.c b/drivers/net/wireless/ath/ath12k/mhi.c
> index 56e697fbdad52..90b7774ae6e8c 100644
> --- a/drivers/net/wireless/ath/ath12k/mhi.c
> +++ b/drivers/net/wireless/ath/ath12k/mhi.c
> @@ -211,6 +211,8 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci)
> if (!board_id || (board_id == OTP_INVALID_BOARD_ID)) {
> ath12k_dbg(ab, ATH12K_DBG_BOOT,
> "failed to read board id\n");
> + } else if (ab->hw_params->fw.unified_fw_image) {
> + ab_pci->unified_fw_board_id = board_id;
> } else if (board_id & OTP_VALID_DUALMAC_BOARD_ID_MASK) {
> dualmac = true;
> ath12k_dbg(ab, ATH12K_DBG_BOOT,
> @@ -218,7 +220,7 @@ int ath12k_mhi_register(struct ath12k_pci *ab_pci)
> }
> }
>
> - if (dualmac) {
> + if (!ab->hw_params->fw.unified_fw_image && dualmac) {
> if (ab->fw.amss_dualmac_data && ab->fw.amss_dualmac_len > 0) {
> /* use MHI firmware file from firmware-N.bin */
> mhi_ctrl->fw_data = ab->fw.amss_dualmac_data;
[Severity: Medium]
This problem wasn't introduced by this patch, but does ath12k_mhi_register()
leak mhi_ctrl->irq [1] if mhi_register_controller() fails?
ath12k_mhi_get_msi() allocates the irq array with kcalloc() and assigns it
to mhi_ctrl->irq. If mhi_register_controller() fails later in
ath12k_mhi_register(), the free_controller error path only calls
mhi_free_controller(), which does not free the driver-allocated irq array:
drivers/net/wireless/ath/ath12k/mhi.c:ath12k_mhi_register() {
...
ret = ath12k_mhi_get_msi(ab_pci);
if (ret) {
ath12k_err(ab, "failed to get msi for mhi\n");
goto free_controller;
}
...
ret = mhi_register_controller(mhi_ctrl, ab->hw_params->mhi_config);
if (ret) {
ath12k_err(ab, "failed to register to mhi bus, err = %d\n", ret);
goto free_controller;
}
return 0;
free_controller:
mhi_free_controller(mhi_ctrl);
ab_pci->mhi_ctrl = NULL;
return ret;
}
Calling kfree(mhi_ctrl->irq) on the error path before mhi_free_controller(),
matching ath12k_mhi_unregister(), would avoid the leak.
[1] https://sashiko.dev/#/bug/linux-7faf2081-d31b-4759-a736-dcc2f8a00de5
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-wifi8_qcn9575_bringup-v1-0-3f30fbc2bb69@oss.qualcomm.com?part=9
next prev parent reply other threads:[~2026-11-12 9:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 8:32 [PATCH ath-next 00/15] wifi: ath12k: add initial Wi-Fi 8 support for QCN9575 Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 01/15] dt-bindings: net: wireless: add ath12k wifi device QCN9575 Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 02/15] wifi: ath12k: refactor PCI window selection to per-device layout Madhavan Ganesan
2026-11-12 8:46 ` sashiko-bot
2026-11-12 8:32 ` [PATCH ath-next 03/15] wifi: ath12k: add extended QMI WLAN cfg for CE and service pipes Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 04/15] wifi: ath12k: add QMI support for extended firmware binary download Madhavan Ganesan
2026-11-12 9:07 ` sashiko-bot
2026-11-12 8:32 ` [PATCH ath-next 05/15] wifi: ath12k: add Wi-Fi 8 directory and base module scaffolding Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 06/15] wifi: ath12k: add initial Wi-Fi 8 hw params and init helper for QCN9575 Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 07/15] wifi: ath12k: add Wi-Fi 8 HAL register table and hal init hook " Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 08/15] wifi: ath12k: add Wi-Fi 8 HAL ops and descriptor definitions " Madhavan Ganesan
2026-11-12 9:25 ` sashiko-bot
2026-11-12 8:32 ` [PATCH ath-next 09/15] wifi: ath12k: add unified firmware image support " Madhavan Ganesan
2026-11-12 9:44 ` sashiko-bot [this message]
2026-11-12 8:32 ` [PATCH ath-next 10/15] wifi: ath12k: add Wi-Fi 8 MHI config " Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 11/15] wifi: ath12k: add Wi-Fi 8 CE config and service pipe map " Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 12/15] wifi: ath12k: add Wi-Fi 8 WMI init " Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 13/15] wifi: ath12k: add Wi-Fi 8 hw ops " Madhavan Ganesan
2026-11-12 8:32 ` [PATCH ath-next 14/15] wifi: ath12k: add and hook Wi-Fi 8 mac80211 ops skeleton " Madhavan Ganesan
2026-11-12 10:19 ` sashiko-bot
2026-11-12 8:32 ` [PATCH ath-next 15/15] wifi: ath12k: add Wi-Fi 8 PCI driver scaffolding " Madhavan Ganesan
2026-11-12 10:29 ` 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-210895@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.