mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
mac80211: treat minstrel success probabilities below 10% as implausible
Based on minstrel_ht this patch treats success probabilities below 10% as implausible values for throughput calculation in minstrel's statistics. Current throughput per rate with such a low success probability is reset to 0 MBit/s. Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
f744bf81f7
commit
db8c5ee692
1 changed files with 6 additions and 1 deletions
|
@ -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++;
|
||||
|
||||
|
@ -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) ||
|
||||
|
|
Loading…
Reference in a new issue