mt76x2: 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 <[email protected]>
This commit is contained in:
Felix Fietkau
2018-06-15 19:02:24 +02:00
parent 4936c0cef0
commit 1528fe7f57
+1 -1
View File
@@ -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)