diff options
author | Bing Zhao <bzhao@marvell.com> | 2014-02-07 19:20:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-12 15:36:10 -0500 |
commit | 89467d8ca21b4c62ab1acbadd09e725d2cd410be (patch) | |
tree | b087cbae7748f7b5a81f74a82527a48fe906952c /drivers/net/wireless/mwifiex/11ac.c | |
parent | 7abf4129e6dfe231e81a07af5bde0488bba6f95b (diff) |
mwifiex: make 11ac mcs rate tables global and const
Remove these local array variables and define them as static
const array in global space.
The duplicated mcs_rate table is removed automatically with this
change.
Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/11ac.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/11ac.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/drivers/net/wireless/mwifiex/11ac.c b/drivers/net/wireless/mwifiex/11ac.c index cc0458c87755..f07a5005455d 100644 --- a/drivers/net/wireless/mwifiex/11ac.c +++ b/drivers/net/wireless/mwifiex/11ac.c | |||
@@ -23,6 +23,31 @@ | |||
23 | #include "main.h" | 23 | #include "main.h" |
24 | #include "11ac.h" | 24 | #include "11ac.h" |
25 | 25 | ||
26 | /* Tables of the MCS map to the highest data rate (in Mbps) supported | ||
27 | * for long GI. | ||
28 | */ | ||
29 | static const u16 max_rate_lgi_80MHZ[8][3] = { | ||
30 | {0x124, 0x15F, 0x186}, /* NSS = 1 */ | ||
31 | {0x249, 0x2BE, 0x30C}, /* NSS = 2 */ | ||
32 | {0x36D, 0x41D, 0x492}, /* NSS = 3 */ | ||
33 | {0x492, 0x57C, 0x618}, /* NSS = 4 */ | ||
34 | {0x5B6, 0x6DB, 0x79E}, /* NSS = 5 */ | ||
35 | {0x6DB, 0x83A, 0x0}, /* NSS = 6 */ | ||
36 | {0x7FF, 0x999, 0xAAA}, /* NSS = 7 */ | ||
37 | {0x924, 0xAF8, 0xC30} /* NSS = 8 */ | ||
38 | }; | ||
39 | |||
40 | static const u16 max_rate_lgi_160MHZ[8][3] = { | ||
41 | {0x249, 0x2BE, 0x30C}, /* NSS = 1 */ | ||
42 | {0x492, 0x57C, 0x618}, /* NSS = 2 */ | ||
43 | {0x6DB, 0x83A, 0x0}, /* NSS = 3 */ | ||
44 | {0x924, 0xAF8, 0xC30}, /* NSS = 4 */ | ||
45 | {0xB6D, 0xDB6, 0xF3C}, /* NSS = 5 */ | ||
46 | {0xDB6, 0x1074, 0x1248}, /* NSS = 6 */ | ||
47 | {0xFFF, 0x1332, 0x1554}, /* NSS = 7 */ | ||
48 | {0x1248, 0x15F0, 0x1860} /* NSS = 8 */ | ||
49 | }; | ||
50 | |||
26 | /* This function converts the 2-bit MCS map to the highest long GI | 51 | /* This function converts the 2-bit MCS map to the highest long GI |
27 | * VHT data rate. | 52 | * VHT data rate. |
28 | */ | 53 | */ |
@@ -34,29 +59,6 @@ mwifiex_convert_mcsmap_to_maxrate(struct mwifiex_private *priv, | |||
34 | u16 max_rate = 0; | 59 | u16 max_rate = 0; |
35 | u32 usr_vht_cap_info = 0; | 60 | u32 usr_vht_cap_info = 0; |
36 | struct mwifiex_adapter *adapter = priv->adapter; | 61 | struct mwifiex_adapter *adapter = priv->adapter; |
37 | /* tables of the MCS map to the highest data rate (in Mbps) | ||
38 | * supported for long GI | ||
39 | */ | ||
40 | u16 max_rate_lgi_80MHZ[8][3] = { | ||
41 | {0x124, 0x15F, 0x186}, /* NSS = 1 */ | ||
42 | {0x249, 0x2BE, 0x30C}, /* NSS = 2 */ | ||
43 | {0x36D, 0x41D, 0x492}, /* NSS = 3 */ | ||
44 | {0x492, 0x57C, 0x618}, /* NSS = 4 */ | ||
45 | {0x5B6, 0x6DB, 0x79E}, /* NSS = 5 */ | ||
46 | {0x6DB, 0x83A, 0x0}, /* NSS = 6 */ | ||
47 | {0x7FF, 0x999, 0xAAA}, /* NSS = 7 */ | ||
48 | {0x924, 0xAF8, 0xC30} /* NSS = 8 */ | ||
49 | }; | ||
50 | u16 max_rate_lgi_160MHZ[8][3] = { | ||
51 | {0x249, 0x2BE, 0x30C}, /* NSS = 1 */ | ||
52 | {0x492, 0x57C, 0x618}, /* NSS = 2 */ | ||
53 | {0x6DB, 0x83A, 0x0}, /* NSS = 3 */ | ||
54 | {0x924, 0xAF8, 0xC30}, /* NSS = 4 */ | ||
55 | {0xB6D, 0xDB6, 0xF3C}, /* NSS = 5 */ | ||
56 | {0xDB6, 0x1074, 0x1248}, /* NSS = 6 */ | ||
57 | {0xFFF, 0x1332, 0x1554}, /* NSS = 7 */ | ||
58 | {0x1248, 0x15F0, 0x1860} /* NSS = 8 */ | ||
59 | }; | ||
60 | 62 | ||
61 | if (bands & BAND_AAC) | 63 | if (bands & BAND_AAC) |
62 | usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_a; | 64 | usr_vht_cap_info = adapter->usr_dot_11ac_dev_cap_a; |