aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel.c
diff options
context:
space:
mode:
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
263minstrel_get_retry_count(struct minstrel_rate *mr, 263minstrel_get_retry_count(struct minstrel_rate *mr,
264 struct ieee80211_tx_info *info) 264 struct ieee80211_tx_info *info)
265{ 265{
266 unsigned int retry = mr->adjusted_retry_count; 266 u8 retry = mr->adjusted_retry_count;
267 267
268 if (info->control.use_rts) 268 if (info->control.use_rts)
269 retry = max(2U, min(mr->stats.retry_count_rtscts, retry)); 269 retry = max_t(u8, 2, min(mr->stats.retry_count_rtscts, retry));
270 else if (info->control.use_cts_prot) 270 else if (info->control.use_cts_prot)
271 retry = max(2U, min(mr->retry_count_cts, retry)); 271 retry = max_t(u8, 2, min(mr->retry_count_cts, retry));
272 return retry; 272 return retry;
273} 273}
274 274