diff options
author | Ming Lei <tom.leiming@gmail.com> | 2010-07-01 11:19:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-02 13:44:40 -0400 |
commit | ecc3d5ae17e62ce1250abf16ff523c677bf19e2f (patch) | |
tree | 6403f0bafda65b1ea520a70fd48e610535e89129 /net | |
parent | 009271f9187d61c638bb4f3db9ab172c5065e542 (diff) |
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 <tom.leiming@gmail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 8fba6f4c5145..b5ace243546c 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, | |||
443 | minstrel_downgrade_rate(mi, &mi->max_tp_rate, true); | 443 | minstrel_downgrade_rate(mi, &mi->max_tp_rate, true); |
444 | 444 | ||
445 | rate2 = minstrel_get_ratestats(mi, mi->max_tp_rate2); | 445 | rate2 = minstrel_get_ratestats(mi, mi->max_tp_rate2); |
446 | if (rate->attempts > 30 && | 446 | if (rate2->attempts > 30 && |
447 | MINSTREL_FRAC(rate->success, rate->attempts) < | 447 | MINSTREL_FRAC(rate2->success, rate2->attempts) < |
448 | MINSTREL_FRAC(20, 100)) | 448 | MINSTREL_FRAC(20, 100)) |
449 | minstrel_downgrade_rate(mi, &mi->max_tp_rate2, false); | 449 | minstrel_downgrade_rate(mi, &mi->max_tp_rate2, false); |
450 | 450 | ||