mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
fa967b5860
commit
8e31f0d35a
|
@ -485,7 +485,7 @@ static void
|
||||||
mt76x2_phy_adjust_vga_gain(struct mt76x2_dev *dev)
|
mt76x2_phy_adjust_vga_gain(struct mt76x2_dev *dev)
|
||||||
{
|
{
|
||||||
u32 false_cca;
|
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));
|
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)
|
if (false_cca > 800 && dev->cal.agc_gain_adjust < limit)
|
||||||
|
|
Loading…
Reference in New Issue