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>
This commit is contained in:

committed by
Johannes Berg

parent
79f241b41b
commit
8d819a92cc
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user