377-mac80211-minstrel_ht-fix-sample-time-check.patch 881 B

1234567891011121314151617181920212223
  1. From: Felix Fietkau <[email protected]>
  2. Date: Thu, 17 Jun 2021 12:05:54 +0200
  3. Subject: [PATCH] mac80211: minstrel_ht: fix sample time check
  4. We need to skip sampling if the next sample time is after jiffies, not before.
  5. This patch fixes an issue where in some cases only very little sampling (or none
  6. at all) is performed, leading to really bad data rates
  7. Fixes: 80d55154b2f8 ("mac80211: minstrel_ht: significantly redesign the rate probing strategy")
  8. Signed-off-by: Felix Fietkau <[email protected]>
  9. ---
  10. --- a/net/mac80211/rc80211_minstrel_ht.c
  11. +++ b/net/mac80211/rc80211_minstrel_ht.c
  12. @@ -1450,7 +1450,7 @@ minstrel_ht_get_rate(void *priv, struct
  13. (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
  14. return;
  15. - if (time_is_before_jiffies(mi->sample_time))
  16. + if (time_is_after_jiffies(mi->sample_time))
  17. return;
  18. mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL;