diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-03-07 18:35:39 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-03-07 18:35:39 +0000 |
commit | 33f8fa04df589bc8dd9c25d901adcad52369f46b (patch) | |
tree | 3a81d527a175a8726e82d43bdd4ba1124aa71354 /package/mac80211 | |
parent | ae329c40eb19b7ef063eddd10e2da3eff2c57e63 (diff) | |
download | upstream-33f8fa04df589bc8dd9c25d901adcad52369f46b.tar.gz upstream-33f8fa04df589bc8dd9c25d901adcad52369f46b.tar.bz2 upstream-33f8fa04df589bc8dd9c25d901adcad52369f46b.zip |
mac80211: fix a few more minstrel_ht bugs (thx to Christian Lamparter)
SVN-Revision: 20040
Diffstat (limited to 'package/mac80211')
-rw-r--r-- | package/mac80211/patches/560-minstrel_ht.patch | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/package/mac80211/patches/560-minstrel_ht.patch b/package/mac80211/patches/560-minstrel_ht.patch index 9fa9e05c52..1cb433db12 100644 --- a/package/mac80211/patches/560-minstrel_ht.patch +++ b/package/mac80211/patches/560-minstrel_ht.patch @@ -68,7 +68,7 @@ --- /dev/null +++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -0,0 +1,807 @@ +@@ -0,0 +1,809 @@ +/* + * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org> + * @@ -479,13 +479,15 @@ + * downgrade to a lower number of streams if necessary. + */ + rate = minstrel_get_ratestats(mi, mi->max_tp_rate); -+ if (MINSTREL_FRAC(rate->success, rate->attempts) < -+ MINSTREL_FRAC(20, 100) && rate->attempts > 30) ++ if (rate->attempts > 30 && ++ MINSTREL_FRAC(rate->success, rate->attempts) < ++ MINSTREL_FRAC(20, 100)) + minstrel_downgrade_rate(mi, &mi->max_tp_rate, true); + + rate2 = minstrel_get_ratestats(mi, mi->max_tp_rate2); -+ if (MINSTREL_FRAC(rate->success, rate->attempts) < -+ MINSTREL_FRAC(20, 100) && rate->attempts > 30) ++ if (rate->attempts > 30 && ++ MINSTREL_FRAC(rate->success, rate->attempts) < ++ MINSTREL_FRAC(20, 100)) + minstrel_downgrade_rate(mi, &mi->max_tp_rate2, false); + + if (time_after(jiffies, mi->stats_update + (mp->update_interval / 2 * HZ) / 1000)) @@ -1062,7 +1064,7 @@ + struct minstrel_rate_stats *mr = &mi->groups[i].rates[j]; + int idx = i * MCS_GROUP_RATES + j; + -+ if (!mi->groups[i].supported & BIT(j)) ++ if (!(mi->groups[i].supported & BIT(j))) + continue; + + p += sprintf(p, "HT%c0/%cGI ", htmode, gimode); |