Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368438
b: refs/heads/master
c: db8c5ee
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Huehn authored and Johannes Berg committed Mar 6, 2013
1 parent f8a8e02 commit b8b51fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f744bf81f7501d03f45ba23f9cf947abc3b422c9
refs/heads/master: db8c5ee6924cda3823fac83ee8c4115d1a8248c8
7 changes: 6 additions & 1 deletion trunk/net/mac80211/rc80211_minstrel.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
mr->probability = minstrel_ewma(mr->probability,
mr->cur_prob,
EWMA_LEVEL);
mr->cur_tp = mr->probability * (1000000 / usecs);
} else
mr->sample_skipped++;

Expand All @@ -101,6 +100,12 @@ minstrel_update_stats(struct minstrel_priv *mp, struct minstrel_sta_info *mi)
mr->success = 0;
mr->attempts = 0;

/* Update throughput per rate, reset thr. below 10% success */
if (mr->probability < MINSTREL_FRAC(10, 100))
mr->cur_tp = 0;
else
mr->cur_tp = mr->probability * (1000000 / usecs);

/* Sample less often below the 10% chance of success.
* Sample less often above the 95% chance of success. */
if (mr->probability > MINSTREL_FRAC(95, 100) ||
Expand Down

0 comments on commit b8b51fc

Please sign in to comment.