wifi: mt76: mt7925: stop init retries on hung bus

Stop retrying hardware init once the bus is marked hung.

The control path is no longer usable at that point, so more retries only
issue failing device accesses, including MCU commands or register
operations, and delay teardown. Exit early and let the failed device be
torn down quickly.

Signed-off-by: Sean Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
This commit is contained in:
Sean Wang
2026-07-21 10:36:58 +02:00
committed by Felix Fietkau
parent 332bbe9b27
commit 3d1ea49286
+8
View File
@@ -137,10 +137,18 @@ static int mt7925_init_hardware(struct mt792x_dev *dev)
set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state);
for (i = 0; i < MT792x_MCU_INIT_RETRY_COUNT; i++) {
if (atomic_read(&dev->mt76.bus_hung)) {
ret = -EIO;
break;
}
ret = __mt7925_init_hardware(dev);
if (!ret)
break;
if (atomic_read(&dev->mt76.bus_hung))
break;
mt792x_init_reset(dev);
}