wifi: iwlwifi: skip opmode start retries on dead transport
authorJohannes Berg <johannes.berg@intel.com>
Tue, 26 Sep 2023 08:07:15 +0000 (11:07 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 23 Oct 2023 09:42:07 +0000 (11:42 +0200)
These retries aren't going to succeed if the device was
deemed dead and needs to be unbound/rebound/... to be
recovered; skip the retries in that case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230926110319.9f472069d75d.Ib6684c5b2ea8ed98f082c9b0e9bb2b03c3ea4fe3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-drv.c

index fb5e254757e71f363bea82f21082f10b5677cec9..41ae4fae4b8a96dac1359eb48f4ccf14b529450a 100644 (file)
@@ -1429,6 +1429,9 @@ _iwl_op_mode_start(struct iwl_drv *drv, struct iwlwifi_opmode_table *op)
                if (op_mode)
                        return op_mode;
 
+               if (test_bit(STATUS_TRANS_DEAD, &drv->trans->status))
+                       break;
+
                IWL_ERR(drv, "retry init count %d\n", retry);
 
 #ifdef CONFIG_IWLWIFI_DEBUGFS