diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-06-21 11:17:57 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-06-27 18:14:58 +0200 |
commit | fa967b5860318d1e77bf01b5102ce5ea4e56efef (patch) | |
tree | a89a8fd6d3939f6ea254530166b82e1e424f0fd5 /drivers/net | |
parent | mt76: adjust AGC control register 26 based on gain for VHT80 (diff) | |
download | linux-fa967b5860318d1e77bf01b5102ce5ea4e56efef.tar.xz linux-fa967b5860318d1e77bf01b5102ce5ea4e56efef.zip |
mt76: clear false CCA counters after changing gain settings
They will be read on the next calibration step without gain change and
must not count earlier events
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c index a2c3f0e35f86..51fd7ddfa8f5 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c @@ -559,6 +559,9 @@ mt76x2_phy_update_channel_gain(struct mt76x2_dev *dev) dev->cal.agc_gain_cur[1] = gain[1] - gain_delta; dev->cal.agc_gain_adjust = 0; mt76x2_phy_set_gain_val(dev); + + /* clear false CCA counters */ + mt76_rr(dev, MT_RX_STAT_1); } int mt76x2_phy_set_channel(struct mt76x2_dev *dev, |