From: Stanislaw Gruszka Date: Tue, 16 Oct 2018 07:58:43 +0000 (+0200) Subject: mt76x0: do not perform MCU calibration for MT7630 X-Git-Tag: microblaze-v5.1-rc1~130^2~19^2~45^2~59 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=a83150eaad42769e4d08b6e07956a489e40214ae;p=linux-2.6-microblaze.git mt76x0: do not perform MCU calibration for MT7630 Driver works better for MT7630 without MCU calibration, which looks like it can hangs the firmware. Vendor driver do not perform it for MT7630 as well. Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau --- diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h index 17ad3fa0858b..33475788bc26 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h @@ -37,6 +37,11 @@ static inline bool is_mt7610e(struct mt76x02_dev *dev) return false; } +static inline bool is_mt7630(struct mt76x02_dev *dev) +{ + return mt76_chip(&dev->mt76) == 0x7630; +} + /* Init */ struct mt76x02_dev * mt76x0_alloc_device(struct device *pdev, diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c index dbb92586b6e1..37e1ead1dc85 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c @@ -500,6 +500,9 @@ void mt76x0_phy_calibrate(struct mt76x02_dev *dev, bool power_on) struct ieee80211_channel *chan = dev->mt76.chandef.chan; u32 val, tx_alc, reg_val; + if (is_mt7630(dev)) + return; + if (power_on) { mt76x02_mcu_calibrate(dev, MCU_CAL_R, 0, false); mt76x02_mcu_calibrate(dev, MCU_CAL_VCO, chan->hw_value,