@@ -537,13 +537,6 @@ static int mt7921_load_patch(struct mt7921_dev *dev)
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;
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 <lorenzo@kernel.org> --- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)