aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-03-09 03:41:22 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-03-09 03:41:22 +0000
commit730dc33c753538bda0465fd1c5f3063e995bab5a (patch)
treedbefb745e34d88fe972d75af48be564717e85863 /package/mac80211
parent1b7f3d2a31d2859ae015f3f1a156c66f237176ae (diff)
downloadupstream-730dc33c753538bda0465fd1c5f3063e995bab5a.tar.gz
upstream-730dc33c753538bda0465fd1c5f3063e995bab5a.tar.bz2
upstream-730dc33c753538bda0465fd1c5f3063e995bab5a.zip
mac80211: fix minstrel_ht sampling intervals (patch by Daniel Halperin)
SVN-Revision: 25964
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/patches/560-mac80211_minstrel_ht_sampling_fix.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/mac80211/patches/560-mac80211_minstrel_ht_sampling_fix.patch b/package/mac80211/patches/560-mac80211_minstrel_ht_sampling_fix.patch
new file mode 100644
index 0000000000..011f87ad31
--- /dev/null
+++ b/package/mac80211/patches/560-mac80211_minstrel_ht_sampling_fix.patch
@@ -0,0 +1,50 @@
+--- a/net/mac80211/rc80211_minstrel_ht.c
++++ b/net/mac80211/rc80211_minstrel_ht.c
+@@ -415,10 +415,8 @@ minstrel_ht_tx_status(void *priv, struct
+ mi->sample_count--;
+ }
+
+- if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) {
++ if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)
+ mi->sample_packets += info->status.ampdu_len;
+- minstrel_next_sample_idx(mi);
+- }
+
+ for (i = 0; !last; i++) {
+ last = (i == IEEE80211_TX_MAX_RATES - 1) ||
+@@ -553,13 +551,14 @@ minstrel_get_sample_rate(struct minstrel
+ sample_idx = sample_table[mg->column][mg->index];
+ mr = &mg->rates[sample_idx];
+ sample_idx += mi->sample_group * MCS_GROUP_RATES;
++ minstrel_next_sample_idx(mi);
+
+ /*
+ * When not using MRR, do not sample if the probability is already
+ * higher than 95% to avoid wasting airtime
+ */
+ if (!mp->has_mrr && (mr->probability > MINSTREL_FRAC(95, 100)))
+- goto next;
++ return -1;
+
+ /*
+ * Make sure that lower rates get sampled only occasionally,
+@@ -568,17 +567,13 @@ minstrel_get_sample_rate(struct minstrel
+ if (minstrel_get_duration(sample_idx) >
+ minstrel_get_duration(mi->max_tp_rate)) {
+ if (mr->sample_skipped < 20)
+- goto next;
++ return -1;
+
+ if (mi->sample_slow++ > 2)
+- goto next;
++ return -1;
+ }
+
+ return sample_idx;
+-
+-next:
+- minstrel_next_sample_idx(mi);
+- return -1;
+ }
+
+ static void