diff options
| author | Felix Fietkau <[email protected]> | 2021-01-15 12:02:42 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2021-01-22 08:11:37 +0000 |
| commit | 347c2989a8ba8a231f2ffc0635f2f36fedd30bde (patch) | |
| tree | 12e46040a239db3c9867e1530942922b6547676c /net/wireless/util.c | |
| parent | mac80211: minstrel_ht: increase stats update interval (diff) | |
| download | kernel-347c2989a8ba8a231f2ffc0635f2f36fedd30bde.tar.gz kernel-347c2989a8ba8a231f2ffc0635f2f36fedd30bde.zip | |
mac80211: minstrel_ht: fix rounding error in throughput calculation
On lower data rates, the throughput calculation has a significant rounding
error, causing rates like 48M and 54M OFDM to share the same throughput
value with >= 90% success probablity.
This is because the result of the division (prob_avg * 1000) / nsecs
is really small (8 in this example).
Improve accuracy by moving over some zeroes, making better use of the full
range of u32 before the division.
Signed-off-by: Felix Fietkau <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'net/wireless/util.c')
0 files changed, 0 insertions, 0 deletions
