From: Ming Lei Date: Thu, 1 Jul 2010 15:19:50 +0000 (+0800) Subject: minstrel_ht: fix check for downgrading of top2 rate X-Git-Tag: v3.0~4150^2~107^2~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecc3d5ae17e62ce1250abf16ff523c677bf19e2f;p=platform%2Fkernel%2Flinux-amlogic.git minstrel_ht: fix check for downgrading of top2 rate The check should be against current top2 rate, instead of current top rate. Signed-off-by: Ming Lei Acked-by: Felix Fietkau Signed-off-by: John W. Linville --- diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 8fba6f4..b5ace24 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -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);