| 1 | --- a/net/mac80211/rc80211_minstrel_ht.c |
| 2 | +++ b/net/mac80211/rc80211_minstrel_ht.c |
| 3 | @@ -407,8 +407,8 @@ minstrel_ht_tx_status(void *priv, struct |
| 4 | mi->ampdu_len += info->status.ampdu_len; |
| 5 | |
| 6 | if (!mi->sample_wait && !mi->sample_tries && mi->sample_count > 0) { |
| 7 | - mi->sample_wait = 4 + 2 * MINSTREL_TRUNC(mi->avg_ampdu_len); |
| 8 | - mi->sample_tries = 3; |
| 9 | + mi->sample_wait = 16 + 2 * MINSTREL_TRUNC(mi->avg_ampdu_len); |
| 10 | + mi->sample_tries = 2; |
| 11 | mi->sample_count--; |
| 12 | } |
| 13 | |
| 14 | @@ -564,7 +564,7 @@ minstrel_get_sample_rate(struct minstrel |
| 15 | */ |
| 16 | if (minstrel_get_duration(sample_idx) > |
| 17 | minstrel_get_duration(mi->max_tp_rate)) { |
| 18 | - if (mr->sample_skipped < 10) |
| 19 | + if (mr->sample_skipped < 20) |
| 20 | goto next; |
| 21 | |
| 22 | if (mi->sample_slow++ > 2) |
| 23 | @@ -588,6 +588,7 @@ minstrel_ht_get_rate(void *priv, struct |
| 24 | struct minstrel_ht_sta *mi = &msp->ht; |
| 25 | struct minstrel_priv *mp = priv; |
| 26 | int sample_idx; |
| 27 | + bool sample = false; |
| 28 | |
| 29 | if (rate_control_send_low(sta, priv_sta, txrc)) |
| 30 | return; |
| 31 | @@ -598,10 +599,11 @@ minstrel_ht_get_rate(void *priv, struct |
| 32 | info->flags |= mi->tx_flags; |
| 33 | sample_idx = minstrel_get_sample_rate(mp, mi); |
| 34 | if (sample_idx >= 0) { |
| 35 | + sample = true; |
| 36 | minstrel_ht_set_rate(mp, mi, &ar[0], sample_idx, |
| 37 | txrc, true, false); |
| 38 | minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate, |
| 39 | - txrc, false, true); |
| 40 | + txrc, false, false); |
| 41 | info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; |
| 42 | } else { |
| 43 | minstrel_ht_set_rate(mp, mi, &ar[0], mi->max_tp_rate, |
| 44 | @@ -609,7 +611,7 @@ minstrel_ht_get_rate(void *priv, struct |
| 45 | minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate2, |
| 46 | txrc, false, true); |
| 47 | } |
| 48 | - minstrel_ht_set_rate(mp, mi, &ar[2], mi->max_prob_rate, txrc, false, true); |
| 49 | + minstrel_ht_set_rate(mp, mi, &ar[2], mi->max_prob_rate, txrc, false, !sample); |
| 50 | |
| 51 | ar[3].count = 0; |
| 52 | ar[3].idx = -1; |
| 53 | |