mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 21:36:52 +00:00
mt76: mt7921: move fw toggle in mt7921_load_firmware
Move drv_own/fw_own toggle in mt7921_load_firmware. This change allow to reuse connac code to load patch for mt7921 driver. Signed-off-by: Lorenzo Bianconi <[email protected]> Tested-by: Deren Wu <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
fee8a5911c
commit
db4d784ae7
+7
-7
@@ -537,13 +537,6 @@ out:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ret && mt76_is_sdio(&dev->mt76)) {
|
||||
/* activate again */
|
||||
ret = __mt7921_mcu_fw_pmctrl(dev);
|
||||
if (!ret)
|
||||
ret = __mt7921_mcu_drv_pmctrl(dev);
|
||||
}
|
||||
|
||||
release_firmware(fw);
|
||||
|
||||
return ret;
|
||||
@@ -662,6 +655,13 @@ static int mt7921_load_firmware(struct mt7921_dev *dev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (mt76_is_sdio(&dev->mt76)) {
|
||||
/* activate again */
|
||||
ret = __mt7921_mcu_fw_pmctrl(dev);
|
||||
if (!ret)
|
||||
ret = __mt7921_mcu_drv_pmctrl(dev);
|
||||
}
|
||||
|
||||
ret = mt7921_load_ram(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user