After carl9170_usb_open() uploads the firmware and asserts the USB endpoints are ready, the driver proceeds with carl9170_init_mac() and subsequent register writes without verifying that the firmware is actually executing and responding to commands. If the firmware is in a deadlocked state, the register writes in carl9170_init_mac(), carl9170_set_qos(), and carl9170_upload_key() will time out one by one, each waiting up to 1 second, delaying the inevitable error by many seconds before mac80211 sees a failure. Add a carl9170_echo_test() immediately after carl9170_usb_open() to verify the firmware is alive before committing to the full init sequence. If the echo test fails, propagate the error immediately. The echo test runs while the device state is still CARL9170_IDLE, which satisfies the IS_ACCEPTING_CMD() guard in carl9170_exec_cmd(). Only a genuine firmware deadlock (echo timing out) causes the early return. Signed-off-by: Masi Osmani --- --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c @@ -374,6 +374,16 @@ static int carl9170_op_start(struct ieee80211_hw *hw) err = carl9170_usb_open(ar); if (err) goto out; + + /* + * Verify the firmware is alive before the full init sequence. + * A deadlocked firmware causes each register write to time out + * (1s each), stalling mac80211. Fail fast. + * State is CARL9170_IDLE here, satisfying IS_ACCEPTING_CMD(). + */ + err = carl9170_echo_test(ar, 0xdeadbeef); + if (err) + goto out; err = carl9170_init_mac(ar); if (err) -- Regards, Masi Osmani