aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-12-17 13:38:34 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-12-19 21:34:22 +0100
commit8d819a92cc7fef4294dd11faa60050fd3c5460e0 (patch)
treee03e57c24526321164eae39d8e89dc43c7228b96 /net/mac80211/rc80211_minstrel.h
parentnl80211: increase the max number of rules in regdomain (diff)
downloadlinux-dev-8d819a92cc7fef4294dd11faa60050fd3c5460e0.tar.xz
linux-dev-8d819a92cc7fef4294dd11faa60050fd3c5460e0.zip
mac80211: minstrel: reduce size of struct minstrel_rate_stats
On minstrel_ht, the size of the per-sta struct is almost 18k, making it an order-3 allocation. A few fields inside the per-rate statistics are bigger than they need to be. This patch reduces the size enough to cut down the per-sta struct to about 13k (order-2 allocation). Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel.h')
-rw-r--r--net/mac80211/rc80211_minstrel.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 97eca86a4af0..410efe620c57 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -33,8 +33,8 @@ minstrel_ewma(int old, int new, int weight)
struct minstrel_rate_stats {
/* current / last sampling period attempts/success counters */
- unsigned int attempts, last_attempts;
- unsigned int success, last_success;
+ u16 attempts, last_attempts;
+ u16 success, last_success;
/* total attempts/success counters */
u64 att_hist, succ_hist;
@@ -46,8 +46,8 @@ struct minstrel_rate_stats {
unsigned int cur_prob, probability;
/* maximum retry counts */
- unsigned int retry_count;
- unsigned int retry_count_rtscts;
+ u8 retry_count;
+ u8 retry_count_rtscts;
u8 sample_skipped;
bool retry_updated;
@@ -55,14 +55,15 @@ struct minstrel_rate_stats {
struct minstrel_rate {
int bitrate;
- int rix;
+
+ s8 rix;
+ u8 retry_count_cts;
+ u8 adjusted_retry_count;
unsigned int perfect_tx_time;
unsigned int ack_time;
int sample_limit;
- unsigned int retry_count_cts;
- unsigned int adjusted_retry_count;
struct minstrel_rate_stats stats;
};