]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: minstrel_ht: improve sample rate skip logic
authorFelix Fietkau <nbd@openwrt.org>
Thu, 3 Mar 2016 22:25:42 +0000 (23:25 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 Apr 2016 09:40:06 +0000 (11:40 +0200)
commit57b1075babf83d290f74fed6caeda6d93b1928a7
tree5231a7933947f2163e395e105f425dde6f184082
parent20e8d81ad097addff16bde046c23918877a5e32b
mac80211: minstrel_ht: improve sample rate skip logic

There were a few issues that were slowing down the process of finding
the optimal rate, especially on devices with multi-rate retry
limitations:

When max_tp_rate[0] was slower than max_tp_rate[1], the code did not
sample max_tp_rate[1], which would often allow it to switch places with
max_tp_rate[0] (e.g. if only the first sampling attempts were bad, but the
rate is otherwise good).

Also, sample attempts of rates between max_tp_rate[0] and [1] were being
ignored in this case, because the code only checked if the rate was
slower than [1].

Fix this by checking against the fastest / second fastest max_tp_rate
instead of assuming a specific order between the two.

In my tests this patch significantly reduces the time until minstrel_ht
finds the optimal rate right after assoc

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