Commit c132fc7d authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

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: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Tested-by: default avatarDeren Wu <deren.wu@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 3d8c636c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment