aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>2018-10-27 21:06:25 +0200
committerFelix Fietkau <nbd@nbd.name>2018-11-30 12:21:42 +0100
commit0464cbfc36ac35700d572925769d7c73b3744798 (patch)
tree7e57a10886ee7870c416a26830523c2b32c29217 /drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
parentmt76x0: do not overwrite other MT_BBP(AGC, 8) fields (diff)
downloadwireguard-linux-0464cbfc36ac35700d572925769d7c73b3744798.tar.xz
wireguard-linux-0464cbfc36ac35700d572925769d7c73b3744798.zip
mt76x0: phy: use mt76_poll_msec in mt76x0_phy_temp_sensor
Use mt76_poll_msec utility routine for CORE_R34 register polling instead of mt76_poll in order to allow the hw to complete requested calibration since on slow devices (e.g. mt7620 based boards) calibration takes longer than 2ms Fixes: 66a34c66e0cb ("mt76x0: phy: add phy/vco temperature compensation") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0/phy.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x0/phy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
index ec9b2a2a403f..563f1cbbeab4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
@@ -686,8 +686,7 @@ static void mt76x0_phy_temp_sensor(struct mt76x02_dev *dev)
mt76x0_rf_wr(dev, MT_RF(0, 67), 0x01);
mt76_wr(dev, MT_BBP(CORE, 34), 0x00080055);
-
- if (!mt76_poll(dev, MT_BBP(CORE, 34), BIT(4), 0, 2000)) {
+ if (!mt76_poll_msec(dev, MT_BBP(CORE, 34), BIT(4), 0, 200)) {
mt76_clear(dev, MT_BBP(CORE, 34), BIT(4));
goto done;
}