aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <[email protected]>2024-08-22 17:30:52 +0100
committerGreg Kroah-Hartman <[email protected]>2024-08-23 09:16:45 +0800
commit1eff40c209b1acc7d6bf58176d1e710f65b6a38d (patch)
treeb4f42da51a0732890dfa7da3f2e3cd4a6a5611a2
parent5e24979acfbd8017a72b5e4e792fa4c6e0b83b05 (diff)
staging: rtl8723bs: make read-only array dot11_rate_table static const
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/rtl8723bs/core/rtw_ieee80211.c4
1 files changed, 3 insertions, 1 deletions
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) {