]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
minstrel_ht: fix check for downgrading of top2 rate
authorMing Lei <tom.leiming@gmail.com>
Thu, 1 Jul 2010 15:19:50 +0000 (23:19 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 2 Jul 2010 17:44:40 +0000 (13:44 -0400)
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>
net/mac80211/rc80211_minstrel_ht.c

index 8fba6f4c514593d05458734e158fcdf52bb18283..b5ace243546c7069791321c1b74380bbd79ad7cb 100644 (file)
@@ -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);