summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel_ht.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-10-06 19:35:02 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-10-11 16:01:02 +0200
commit202df504d7dea489ce74a913d4b529531bdff312 (patch)
tree12a1008f6084ed86f5e944805b5b578d77874b8b /net/mac80211/rc80211_minstrel_ht.h
parentb1c4f68337fa6b7c09154bb2bf2ec6f0d30ab652 (diff)
downloadlinux-202df504d7dea489ce74a913d4b529531bdff312.tar.bz2
mac80211: minstrel: reduce minstrel_mcs_groups size
By storing a shift value for all duration values of a group, we can reduce precision by a neglegible amount to make it fit into a u16 value. This improves cache footprint and reduces size: Before: text data bss dec hex filename 10024 116 0 10140 279c rc80211_minstrel_ht.o After: text data bss dec hex filename 9368 116 0 9484 250c rc80211_minstrel_ht.o Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.h')
-rw-r--r--net/mac80211/rc80211_minstrel_ht.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h
index ad17df10a947..26b7a3244b47 100644
--- a/net/mac80211/rc80211_minstrel_ht.h
+++ b/net/mac80211/rc80211_minstrel_ht.h
@@ -33,9 +33,10 @@
#define MCS_GROUP_RATES 10
struct mcs_group {
- u32 flags;
- unsigned int streams;
- unsigned int duration[MCS_GROUP_RATES];
+ u16 flags;
+ u8 streams;
+ u8 shift;
+ u16 duration[MCS_GROUP_RATES];
};
extern const struct mcs_group minstrel_mcs_groups[];