diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2019-01-22 13:38:35 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-31 08:15:46 +0100 |
commit | 14275ffa9ba5489174d099b1890bf7ef28bde2ed (patch) | |
tree | ff115def537443e64ae2336a931737ff51c47045 /drivers | |
parent | e15c6c8a835125d4415f7cba865067c227bffa72 (diff) |
mt76x0: do not perform MCU calibration for MT7630
commit a83150eaad42769e4d08b6e07956a489e40214ae upstream.
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: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x0/phy.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h index 2187bafaf2e9..0057f69d0c36 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h @@ -41,6 +41,11 @@ static inline bool is_mt7610e(struct mt76x02_dev *dev) void mt76x0_init_debugfs(struct mt76x02_dev *dev); +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 f99097e265aa..d598ddc632cc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/phy.c @@ -588,6 +588,9 @@ void mt76x0_phy_calibrate(struct mt76x02_dev *dev, bool power_on) int is_5ghz = (chan->band == NL80211_BAND_5GHZ) ? 1 : 0; 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, |