Skip to content

Commit

Permalink
mt76x0: phy: fix restore phase in mt76x0_phy_recalibrate_after_assoc
Browse files Browse the repository at this point in the history
Fix restore value configured in MT_BBP(IBI, 9) register in
mt76x0_phy_recalibrate_after_assoc routine.

Fixes: 10de7a8b4ab9 ("mt76x0: phy files")
Signed-off-by: Lorenzo Bianconi <[email protected]>
  • Loading branch information
LorenzoBianconi authored and nbd168 committed Oct 9, 2018
1 parent 2b79bb7 commit 8a0acfd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mt76x0/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,8 @@ void mt76x0_phy_recalibrate_after_assoc(struct mt76x02_dev *dev)
mt76_wr(dev, MT_TX_ALC_CFG_0, 0);
usleep_range(500, 700);

reg_val = mt76_rr(dev, 0x2124);
reg_val &= 0xffffff7e;
mt76_wr(dev, 0x2124, reg_val);
reg_val = mt76_rr(dev, MT_BBP(IBI, 9));
mt76_wr(dev, MT_BBP(IBI, 9), 0xffffff7e);

mt76x02_mcu_calibrate(dev, MCU_CAL_RXDCOC, 0, false);

Expand All @@ -746,7 +745,7 @@ void mt76x0_phy_recalibrate_after_assoc(struct mt76x02_dev *dev)
mt76x02_mcu_calibrate(dev, MCU_CAL_RXIQ, is_5ghz, false);
mt76x02_mcu_calibrate(dev, MCU_CAL_RX_GROUP_DELAY, is_5ghz, false);

mt76_wr(dev, 0x2124, reg_val);
mt76_wr(dev, MT_BBP(IBI, 9), reg_val);
mt76_wr(dev, MT_TX_ALC_CFG_0, tx_alc);
msleep(100);

Expand Down

0 comments on commit 8a0acfd

Please sign in to comment.