ssb: update ssb to version from linux-next-20110311
[openwrt/staging/lynxis/omap.git] / package / mac80211 / patches / 560-mac80211_minstrel_ht_sampling_fix.patch
1 --- a/net/mac80211/rc80211_minstrel_ht.c
2 +++ b/net/mac80211/rc80211_minstrel_ht.c
3 @@ -415,10 +415,8 @@ minstrel_ht_tx_status(void *priv, struct
4 mi->sample_count--;
5 }
6
7 - if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) {
8 + if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)
9 mi->sample_packets += info->status.ampdu_len;
10 - minstrel_next_sample_idx(mi);
11 - }
12
13 for (i = 0; !last; i++) {
14 last = (i == IEEE80211_TX_MAX_RATES - 1) ||
15 @@ -553,13 +551,14 @@ minstrel_get_sample_rate(struct minstrel
16 sample_idx = sample_table[mg->column][mg->index];
17 mr = &mg->rates[sample_idx];
18 sample_idx += mi->sample_group * MCS_GROUP_RATES;
19 + minstrel_next_sample_idx(mi);
20
21 /*
22 * When not using MRR, do not sample if the probability is already
23 * higher than 95% to avoid wasting airtime
24 */
25 if (!mp->has_mrr && (mr->probability > MINSTREL_FRAC(95, 100)))
26 - goto next;
27 + return -1;
28
29 /*
30 * Make sure that lower rates get sampled only occasionally,
31 @@ -568,17 +567,13 @@ minstrel_get_sample_rate(struct minstrel
32 if (minstrel_get_duration(sample_idx) >
33 minstrel_get_duration(mi->max_tp_rate)) {
34 if (mr->sample_skipped < 20)
35 - goto next;
36 + return -1;
37
38 if (mi->sample_slow++ > 2)
39 - goto next;
40 + return -1;
41 }
42
43 return sample_idx;
44 -
45 -next:
46 - minstrel_next_sample_idx(mi);
47 - return -1;
48 }
49
50 static void