Skip to content

Commit

Permalink
mt76x0: do not perform MCU calibration for MT7630
Browse files Browse the repository at this point in the history
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 <sgruszka@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Stanislaw Gruszka authored and Felix Fietkau committed Nov 30, 2018
1 parent 1163bdb commit a83150e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/mediatek/mt76/mt76x0/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a83150e

Please sign in to comment.