wifi: mt76: mt792x: ensure MCU ready before ROM patch download

Restart the MCU and poll FW state to ensure correct MCU status
before downloading the ROM patch.

This is a prerequisite for enabling MT7902 PCIe and has been
validated on MT7921 and MT7925 since they share the common code path.

Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Sean Wang
2026-02-21 09:29:41 +00:00
committed by Felix Fietkau
parent 135ebed775
commit cc343793ad
+7
View File
@@ -925,6 +925,13 @@ int mt792x_load_firmware(struct mt792x_dev *dev)
{ {
int ret; int ret;
mt76_connac_mcu_restart(&dev->mt76);
if (!mt76_poll_msec(dev, MT_CONN_ON_MISC, MT_TOP_MISC_FW_STATE,
MT_TOP_MISC2_FW_PWR_ON, 1000))
dev_warn(dev->mt76.dev,
"MCU is not ready for firmware download\n");
ret = mt76_connac2_load_patch(&dev->mt76, mt792x_patch_name(dev)); ret = mt76_connac2_load_patch(&dev->mt76, mt792x_patch_name(dev));
if (ret) if (ret)
return ret; return ret;