diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-06-21 11:17:58 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-06-27 19:15:03 +0300 |
commit | 8e31f0d35a881537cf9b4ebabf63791dde3bbb0a (patch) | |
tree | 1ae16912b14fc262d58bb5869e5cd73191823445 /drivers/net/wireless/mediatek/mt76 | |
parent | fa967b5860318d1e77bf01b5102ce5ea4e56efef (diff) | |
download | linux-stable-8e31f0d35a881537cf9b4ebabf63791dde3bbb0a.tar.gz linux-stable-8e31f0d35a881537cf9b4ebabf63791dde3bbb0a.tar.bz2 linux-stable-8e31f0d35a881537cf9b4ebabf63791dde3bbb0a.zip |
mt76: fix variable gain adjustment range
The range should only be limited to 4 for really weak signals, for all
other gain settings the range is 16.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c index 51fd7ddfa8f5..9c7b19ce73f2 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c @@ -485,7 +485,7 @@ static void mt76x2_phy_adjust_vga_gain(struct mt76x2_dev *dev) { u32 false_cca; - u8 limit = dev->cal.low_gain > 1 ? 4 : 16; + u8 limit = dev->cal.low_gain > 0 ? 16 : 4; false_cca = FIELD_GET(MT_RX_STAT_1_CCA_ERRORS, mt76_rr(dev, MT_RX_STAT_1)); if (false_cca > 800 && dev->cal.agc_gain_adjust < limit) |