Commit 066f417b authored by Quan Zhou's avatar Quan Zhou Committed by Felix Fietkau
Browse files

wifi: mt76: mt792x: fix wifi init fail by setting MCU_RUNNING after CLC load



Set the MT76_STATE_MCU_RUNNING bit only after mt7921_load_clc()
has successfully completed. Previously, the MCU_RUNNING state
was set before loading CLC, which could cause conflict between
chip mcu_init retry and mac_reset flow, result in chip init fail
and chip abnormal status. By moving the state set after CLC load,
firmware initialization becomes robust and resolves init fail issue.

Signed-off-by: default avatarQuan Zhou <quan.zhou@mediatek.com>
Reviewed-by: default avatar <druth@chromium.org>
Link: https://patch.msgid.link/19ec8e4465142e774f17801025accd0ae2214092.1763465933.git.quan.zhou@mediatek.com


Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent f804a589
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -646,10 +646,10 @@ int mt7921_run_firmware(struct mt792x_dev *dev)
	if (err)
		return err;

	set_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);
	err = mt7921_load_clc(dev, mt792x_ram_name(dev));
	if (err)
		return err;
	set_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);

	return mt7921_mcu_fw_log_2_host(dev, 1);
}
+1 −1
Original line number Diff line number Diff line
@@ -1054,10 +1054,10 @@ int mt7925_run_firmware(struct mt792x_dev *dev)
	if (err)
		return err;

	set_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);
	err = mt7925_load_clc(dev, mt792x_ram_name(dev));
	if (err)
		return err;
	set_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state);

	return mt7925_mcu_fw_log_2_host(dev, 1);
}