From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Rosen Penev <rosenp@gmail.com>, linux-wireless@vger.kernel.org
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH ath-next] wifi: ath9k: mark PN9Data as const
Date: Thu, 18 Jun 2026 14:55:35 -0700 [thread overview]
Message-ID: <9c08b419-7180-4ecf-8a9d-026a80cbb98a@oss.qualcomm.com> (raw)
In-Reply-To: <20260616030652.635121-1-rosenp@gmail.com>
On 6/15/2026 8:06 PM, Rosen Penev wrote:
> PN9Data is a read-only lookup table and is never modified. Adding const
> lets the compiler place it in .rodata and prevents accidental writes.
>
> Assisted-by: opencode:big-pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> drivers/net/wireless/ath/ath9k/tx99.c | 16 ++++++++--------
> drivers/net/wireless/ath/ath9k/xmit.c | 2 +-
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c
> index f2144fd39093..b52d84f6cbc9 100644
> --- a/drivers/net/wireless/ath/ath9k/tx99.c
> +++ b/drivers/net/wireless/ath/ath9k/tx99.c
> @@ -39,14 +39,14 @@ static void ath9k_tx99_stop(struct ath_softc *sc)
>
> static struct sk_buff *ath9k_build_tx99_skb(struct ath_softc *sc)
> {
> - static u8 PN9Data[] = {0xff, 0x87, 0xb8, 0x59, 0xb7, 0xa1, 0xcc, 0x24,
> - 0x57, 0x5e, 0x4b, 0x9c, 0x0e, 0xe9, 0xea, 0x50,
> - 0x2a, 0xbe, 0xb4, 0x1b, 0xb6, 0xb0, 0x5d, 0xf1,
> - 0xe6, 0x9a, 0xe3, 0x45, 0xfd, 0x2c, 0x53, 0x18,
> - 0x0c, 0xca, 0xc9, 0xfb, 0x49, 0x37, 0xe5, 0xa8,
> - 0x51, 0x3b, 0x2f, 0x61, 0xaa, 0x72, 0x18, 0x84,
> - 0x02, 0x23, 0x23, 0xab, 0x63, 0x89, 0x51, 0xb3,
> - 0xe7, 0x8b, 0x72, 0x90, 0x4c, 0xe8, 0xfb, 0xc0};
> + static const u8 PN9Data[] = {0xff, 0x87, 0xb8, 0x59, 0xb7, 0xa1, 0xcc, 0x24,
> + 0x57, 0x5e, 0x4b, 0x9c, 0x0e, 0xe9, 0xea, 0x50,
> + 0x2a, 0xbe, 0xb4, 0x1b, 0xb6, 0xb0, 0x5d, 0xf1,
> + 0xe6, 0x9a, 0xe3, 0x45, 0xfd, 0x2c, 0x53, 0x18,
> + 0x0c, 0xca, 0xc9, 0xfb, 0x49, 0x37, 0xe5, 0xa8,
> + 0x51, 0x3b, 0x2f, 0x61, 0xaa, 0x72, 0x18, 0x84,
> + 0x02, 0x23, 0x23, 0xab, 0x63, 0x89, 0x51, 0xb3,
> + 0xe7, 0x8b, 0x72, 0x90, 0x4c, 0xe8, 0xfb, 0xc0};
> u32 len = 1200;
> struct ieee80211_tx_rate *rate;
> struct ieee80211_hw *hw = sc->hw;
> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
> index 89d8b3178784..57e451548958 100644
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -41,7 +41,7 @@
> #define ATH9K_PWRTBL_11NG_HT_SHIFT 12
>
>
> -static u16 bits_per_symbol[][2] = {
> +static const u16 bits_per_symbol[][2] = {
unrelated change not mentioned in the commit text?
> /* 20MHz 40MHz */
> { 26, 54 }, /* 0: BPSK */
> { 52, 108 }, /* 1: QPSK 1/2 */
> --
> 2.54.0
next prev parent reply other threads:[~2026-06-18 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 3:06 [PATCH ath-next] wifi: ath9k: mark PN9Data as const Rosen Penev
2026-06-18 21:55 ` Jeff Johnson [this message]
2026-06-18 22:58 ` Rosen Penev
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=9c08b419-7180-4ecf-8a9d-026a80cbb98a@oss.qualcomm.com \
--to=jeff.johnson@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rosenp@gmail.com \
--cc=toke@toke.dk \
/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