* [PATCH] staging: rtl8723bs: make read-only array dot11_rate_table static const
@ 2024-08-22 16:30 Colin Ian King
0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2024-08-22 16:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Meir Elisha, linux-staging
Cc: kernel-janitors, linux-kernel
Don't populate the read-only array dot11_rate_table on the stack at
run time, instead make it static const.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index b89e88d6a82d..0cc5142a90e0 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -55,7 +55,9 @@ static u8 WIFI_OFDMRATES[] = {
int rtw_get_bit_value_from_ieee_value(u8 val)
{
- unsigned char dot11_rate_table[] = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108, 0}; /* last element must be zero!! */
+ static const unsigned char dot11_rate_table[] = {
+ 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108, 0
+ }; /* last element must be zero!! */
int i = 0;
while (dot11_rate_table[i] != 0) {
--
2.39.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-22 16:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-22 16:30 [PATCH] staging: rtl8723bs: make read-only array dot11_rate_table static const Colin Ian King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®