562-minstrel_sample_performance.patch 1.8 KB

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