From: Alexander Wilhelm <alexander.wilhelm@westermo.com>
To: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Cc: Jeff Johnson <jjohnson@kernel.org>,
Baochen Qiang <baochen.qiang@oss.qualcomm.com>,
ath12k@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] wifi: ath12k: fix endianness handling for SRNG ring pointer accesses
Date: Wed, 11 Mar 2026 07:58:50 +0100 [thread overview]
Message-ID: <abESqgbpr3wt1_14@FUE-ALEWI-WINX> (raw)
In-Reply-To: <8aaacbb2-8ce6-42b4-923d-78491df6d31a@oss.qualcomm.com>
On Tue, Mar 10, 2026 at 10:55:37AM -0700, Jeff Johnson wrote:
> On 1/18/2026 11:39 PM, Alexander Wilhelm wrote:
> > The SRNG head and tail ring pointers are stored in device memory as
> > little-endian values. On big-endian systems, direct dereferencing of these
> > pointers leads to incorrect values being read or written, causing ring
> > management issues and potentially breaking data flow.
> >
> > This patch ensures all accesses to SRNG ring pointers use the appropriate
> > endianness conversions. This affects both read and write paths for source
> > and destination rings, as well as debug output. The changes guarantee
> > correct operation on both little- and big-endian architectures.
> >
> > Signed-off-by: Alexander Wilhelm <alexander.wilhelm@westermo.com>
> > ---
> > Changes in v3:
> > - Rebase on latest 'ath' master
> > - Use always 'le32_to_cpu()' macro for conversions
> >
> > Changes in v2:
> > - Set '__le32 *' type for 'hp_addr/tp_addr' in both 'dst_ring' and 'src_ring'
> > ---
> > drivers/net/wireless/ath/ath12k/hal.c | 37 +++++++++++++++------------
> > drivers/net/wireless/ath/ath12k/hal.h | 8 +++---
> > 2 files changed, 25 insertions(+), 20 deletions(-)
>
> I really hope to get your changes in.
>
> With your changes sparse reports:
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:322:50: warning: incorrect type in assignment (different base types)
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:322:50: expected restricted __le32 [usertype] *hp_addr
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:322:50: got unsigned int [usertype] *
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:333:50: warning: incorrect type in assignment (different base types)
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:333:50: expected restricted __le32 [usertype] *tp_addr
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:333:50: got unsigned int [usertype] *
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:387:42: warning: incorrect type in assignment (different base types)
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:387:42: expected restricted __le32 [usertype] *tp_addr
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:387:42: got unsigned int [usertype] *
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:390:42: warning: incorrect type in assignment (different base types)
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:390:42: expected restricted __le32 [usertype] *hp_addr
> drivers/net/wireless/ath/ath12k/wifi7/hal.c:390:42: got unsigned int [usertype] *
>
> I'm also getting checkpatch issues:
> drivers/net/wireless/ath/ath12k/hal.c:503: Lines should not end with a '('
> drivers/net/wireless/ath/ath12k/hal.c:531: Lines should not end with a '('
> drivers/net/wireless/ath/ath12k/hal.c:551: Lines should not end with a '('
>
> Can you address these issues?
Hi Jeff,
Sure. It looks like I missed something. I’ll fix it as soon as possible.
Best regards
Alexander Wilhelm
prev parent reply other threads:[~2026-03-11 6:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 7:39 [PATCH v3] wifi: ath12k: fix endianness handling for SRNG ring pointer accesses Alexander Wilhelm
2026-01-19 8:48 ` Baochen Qiang
2026-03-10 17:55 ` Jeff Johnson
2026-03-11 6:58 ` Alexander Wilhelm [this message]
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=abESqgbpr3wt1_14@FUE-ALEWI-WINX \
--to=alexander.wilhelm@westermo.com \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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