mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: always call mt7915_wfsys_reset() during init
Soft reboot might not clear certain condition, so always call mt7915_wfsys_reset() during init. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+3
-12
@@ -656,10 +656,7 @@ mt7915_init_hardware(struct mt7915_dev *dev, struct mt7915_phy *phy2)
|
||||
|
||||
INIT_WORK(&dev->init_work, mt7915_init_work);
|
||||
|
||||
/* If MCU was already running, it is likely in a bad state */
|
||||
if (mt76_get_field(dev, MT_TOP_MISC, MT_TOP_MISC_FW_STATE) >
|
||||
FW_STATE_FW_DOWNLOAD)
|
||||
mt7915_wfsys_reset(dev);
|
||||
mt7915_wfsys_reset(dev);
|
||||
|
||||
ret = mt7915_dma_init(dev, phy2);
|
||||
if (ret)
|
||||
@@ -668,14 +665,8 @@ mt7915_init_hardware(struct mt7915_dev *dev, struct mt7915_phy *phy2)
|
||||
set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state);
|
||||
|
||||
ret = mt7915_mcu_init(dev);
|
||||
if (ret) {
|
||||
/* Reset and try again */
|
||||
mt7915_wfsys_reset(dev);
|
||||
|
||||
ret = mt7915_mcu_init(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = mt7915_eeprom_init(dev);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user