diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-01-20 18:32:52 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-04 15:48:25 -0500 |
commit | f6e1a73b66bdf41765e762eda0f4ecb7d987ea57 (patch) | |
tree | dcf231b294b29919835533ed7d2da056e67dd512 | |
parent | 205d242997b57cd0b82f3c8ce4b3c6fd882bf971 (diff) |
mac80211: minstrel_ht: sample_table can be __read_mostly
The sample table is initialized only once at module start, so
is really __read_mostly. Additionally, the code to init it can
be marked __init since it will never be needed again, it is
likely automatically inlined into the __init function already
by the compiler, so this doesn't really make a difference.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index a6d6cc5c3db4..bccaf854a309 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -124,7 +124,7 @@ const struct mcs_group minstrel_mcs_groups[] = { | |||
124 | 124 | ||
125 | #define MINSTREL_CCK_GROUP (ARRAY_SIZE(minstrel_mcs_groups) - 1) | 125 | #define MINSTREL_CCK_GROUP (ARRAY_SIZE(minstrel_mcs_groups) - 1) |
126 | 126 | ||
127 | static u8 sample_table[SAMPLE_COLUMNS][MCS_GROUP_RATES]; | 127 | static u8 sample_table[SAMPLE_COLUMNS][MCS_GROUP_RATES] __read_mostly; |
128 | 128 | ||
129 | static void | 129 | static void |
130 | minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi); | 130 | minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi); |
@@ -1048,8 +1048,7 @@ static const struct rate_control_ops mac80211_minstrel_ht = { | |||
1048 | }; | 1048 | }; |
1049 | 1049 | ||
1050 | 1050 | ||
1051 | static void | 1051 | static void __init init_sample_table(void) |
1052 | init_sample_table(void) | ||
1053 | { | 1052 | { |
1054 | int col, i, new_idx; | 1053 | int col, i, new_idx; |
1055 | u8 rnd[MCS_GROUP_RATES]; | 1054 | u8 rnd[MCS_GROUP_RATES]; |