summaryrefslogtreecommitdiff
path: root/net/mac80211/rc80211_minstrel.c
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.c
parent79f241b41b5f581c6be66785ab8b9c8e3b1651c7 (diff)
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.c')
-rw-r--r--net/mac80211/rc80211_minstrel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index d51f6b1c549b..7c86a002df95 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -263,12 +263,12 @@ static inline unsigned int
minstrel_get_retry_count(struct minstrel_rate *mr,
struct ieee80211_tx_info *info)
{
- unsigned int retry = mr->adjusted_retry_count;
+ u8 retry = mr->adjusted_retry_count;
if (info->control.use_rts)
- retry = max(2U, min(mr->stats.retry_count_rtscts, retry));
+ retry = max_t(u8, 2, min(mr->stats.retry_count_rtscts, retry));
else if (info->control.use_cts_prot)
- retry = max(2U, min(mr->retry_count_cts, retry));
+ retry = max_t(u8, 2, min(mr->retry_count_cts, retry));
return retry;
}