Devicetree
 help / color / mirror / Atom feed
From: Madhavan Ganesan <madhavan.ganesan@oss.qualcomm.com>
To: sashiko-reviews@lists.linux.dev
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH ath-next 02/15] wifi: ath12k: refactor PCI window selection to per-device layout
Date: Wed, 18 Nov 2026 10:53:20 +0530	[thread overview]
Message-ID: <c539bd0d-e54f-4858-96ce-84b02f7f9ef7@oss.qualcomm.com> (raw)
In-Reply-To: <sashiko-outbox-210781@kernel.org>



On 11/12/2026 2:16 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Medium] wifi: ath12k: hardcoded 0x3f window mask in
>    ath12k_pcic_select_static_window()
> --
> 
> commit bb1726c3a715437675ea3d3a7a6b0b741f959d92
> Author: Madhavan Ganesan <madhavan.ganesan@oss.qualcomm.com>
> 
> wifi: ath12k: refactor PCI window selection to per-device layout
> 
> This commit moves PCI and AHB register window masks and register offsets into
> per-device layout structures so device families with different window layouts
> can configure their own window mapping.
> 
>> diff --git a/drivers/net/wireless/ath/ath12k/pcic.c b/drivers/net/wireless/ath/ath12k/pcic.c
>> index b6d306fd3b99f..cd04b9531d912 100644
>> --- a/drivers/net/wireless/ath/ath12k/pcic.c
>> +++ b/drivers/net/wireless/ath/ath12k/pcic.c
> [ ... ]
>> @@ -32,7 +38,7 @@ static int ath12k_pcic_select_static_window(struct ath12k_base *ab, u32 addr)
>>   	const int max_retries = 10;
>>   	int i;
>>   
>> -	window_bits = u32_get_bits(addr, WINDOW_VALUE_MASK);
>> +	window_bits = field_get(ab_ahb->reg_base->window_value_mask, addr);
>>   
>>   	/* Update window bits [5:0], preserving other bits */
>>   	new_window = u32_replace_bits(ab_ahb->static_window_reg, window_bits, 0x3f);
> 
> [Severity: Medium]
> Should ath12k_pcic_select_static_window() use
> ab_ahb->reg_base->window_static_mask (like ath12k_pci_select_window() does)
> instead of hardcoding 0x3f here?
> 
> Leaving 0x3f hardcoded leaves struct ath12k_ahb_reg_base::window_static_mask
> unused across the driver and truncates window_bits to 6 bits on AHB/PCIC
> devices whose dynamic window field is not bits [5:0], misprogramming the
> window register during CMEM accesses.
> 

I will address this in the next version.

  reply	other threads:[~2026-11-18  5:23 UTC|newest]

Thread overview: 28+ 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-18  5:23     ` Madhavan Ganesan [this message]
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-18  5:23     ` Madhavan Ganesan
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-18  5:23     ` Madhavan Ganesan
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
2026-11-18  5:24     ` Madhavan Ganesan
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-18  5:24     ` Madhavan Ganesan
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
2026-11-18  5:24     ` Madhavan Ganesan

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=c539bd0d-e54f-4858-96ce-84b02f7f9ef7@oss.qualcomm.com \
    --to=madhavan.ganesan@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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