aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/rc80211_minstrel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 5c0f5327c77f..f8d99a54798f 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -92,7 +92,6 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
92 mr->probability = minstrel_ewma(mr->probability, 92 mr->probability = minstrel_ewma(mr->probability,
93 mr->cur_prob, 93 mr->cur_prob,
94 EWMA_LEVEL); 94 EWMA_LEVEL);
95 mr->cur_tp = mr->probability * (1000000 / usecs);
96 } else 95 } else
97 mr->sample_skipped++; 96 mr->sample_skipped++;
98 97
@@ -101,6 +100,12 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
101 mr->success = 0; 100 mr->success = 0;
102 mr->attempts = 0; 101 mr->attempts = 0;
103 102
103 /* Update throughput per rate, reset thr. below 10% success */
104 if (mr->probability < MINSTREL_FRAC(10, 100))
105 mr->cur_tp = 0;
106 else
107 mr->cur_tp = mr->probability * (1000000 / usecs);
108
104 /* Sample less often below the 10% chance of success. 109 /* Sample less often below the 10% chance of success.
105 * Sample less often above the 95% chance of success. */ 110 * Sample less often above the 95% chance of success. */
106 if (mr->probability > MINSTREL_FRAC(95, 100) || 111 if (mr->probability > MINSTREL_FRAC(95, 100) ||