]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: improve gain adjustment in noisy environments
authorFelix Fietkau <nbd@nbd.name>
Thu, 21 Jun 2018 09:18:01 +0000 (11:18 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 27 Jun 2018 16:15:14 +0000 (19:15 +0300)
commit5e4516e2beb72eedf6ee19ab89ff197431ba69a7
tree0f8da724bba3bfbb87d7035c75f9fe77200439b5
parent33c16dd650564ae3793a25b27ddc5515588aecfa
mt76: improve gain adjustment in noisy environments

When switching between low gain (high RSSI) and high gain settings, it
can take a few seconds to adjust to the current environment.
This can lead to short periods of time with extreme packet loss.

When switching from low_gain=1 to low_gain=2, start with the same gain
adjustment value instead of the lowest to avoid spikes of huge numbers
of false CCA events

Also avoid resetting adjustment values on switching between low_gain
values 0 and 1, since it affects only the upper limit of vga adjustment

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mt76x2_phy.c