]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211/minstrel_ht: improve accuracy of throughput metric at high data rates
authorFelix Fietkau <nbd@openwrt.org>
Sat, 2 Mar 2013 20:20:12 +0000 (21:20 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Mar 2013 15:35:51 +0000 (16:35 +0100)
commit835e93a18fc6fc93d319648e7c52c1b42ddedcd9
treeddcea367a65e89414cfd550120368203ebf6fd1a
parenteb6d6011e1caa1177152f2519914dbfc70e7dea8
mac80211/minstrel_ht: improve accuracy of throughput metric at high data rates

At high data rates the average frame transmission durations are small
enough for rounding errors to matter, sometimes causing minstrel to use
slightly lower transmit rates than necessary.
To fix this, change the unit of the duration value to nanoseconds
instead of microseconds, and reorder the multiplications/divisions when
calculating the throughput metric so that they don't overflow or
truncate prematurely.
At 2-stream HT40 this makes TCP throughput a bit more stable.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rc80211_minstrel_ht.c