Skip to contentSkip to conversation

minstrel_ht: fix check for downgrading of top2 rate

PATCH In review [email protected] 2 participants 2 messages Jul 1, 2010 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 minstrel_ht: fix check for downgrading of top2 rate

From: Ming Lei <[email protected]>

The check should be against current top2 rate, instead of current top rate.

---
 net/mac80211/rc80211_minstrel_ht.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
net/mac80211/rc80211_minstrel_ht.c +2 -2
index 8fba6f4..b5ace24 100644
@@ -443,8 +443,8 @@ minstrel_ht_tx_status(void *priv, struct ieee80211_supported_band *sband,
 		minstrel_downgrade_rate(mi, &mi->max_tp_rate, true);
 
 	rate2 = minstrel_get_ratestats(mi, mi->max_tp_rate2);
-	if (rate->attempts > 30 &&
-	    MINSTREL_FRAC(rate->success, rate->attempts) <
+	if (rate2->attempts > 30 &&
+	    MINSTREL_FRAC(rate2->success, rate2->attempts) <
 	    MINSTREL_FRAC(20, 100))
 		minstrel_downgrade_rate(mi, &mi->max_tp_rate2, false);
 
Signature · 1 line
1.6.2.5