]> Git Repo - linux.git/commitdiff
wifi: iwlwifi: remove retry loops in start
authorJohannes Berg <[email protected]>
Tue, 23 Jan 2024 18:08:15 +0000 (20:08 +0200)
committerJohannes Berg <[email protected]>
Fri, 26 Jan 2024 08:48:53 +0000 (09:48 +0100)
There's either the pldr_sync case, in which case we didn't want
or do the retry loops anyway, or things will just continue to
fail. Remove the retry loop that was added in a previous attempt
to address the issue that was later (though still a bit broken)
addressed by the pldr_sync case.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Gregory Greenman <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://msgid.link/20240123200528.f80a88a18799.I48f21eda090f4cc675f40e99eef69a986d21b500@changeid
Signed-off-by: Johannes Berg <[email protected]>
drivers/net/wireless/intel/iwlwifi/iwl-drv.c
drivers/net/wireless/intel/iwlwifi/iwl-drv.h
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

index ffe2670720c9257c30cd86aa3f5edf7386bce602..8d562d0e87e46867d9427e8db3d84b8956cbf9e6 100644 (file)
@@ -1423,35 +1423,25 @@ _iwl_op_mode_start(struct iwl_drv *drv, struct iwlwifi_opmode_table *op)
        const struct iwl_op_mode_ops *ops = op->ops;
        struct dentry *dbgfs_dir = NULL;
        struct iwl_op_mode *op_mode = NULL;
-       int retry, max_retry = !!iwlwifi_mod_params.fw_restart * IWL_MAX_INIT_RETRY;
 
        /* also protects start/stop from racing against each other */
        lockdep_assert_held(&iwlwifi_opmode_table_mtx);
 
-       for (retry = 0; retry <= max_retry; retry++) {
-
 #ifdef CONFIG_IWLWIFI_DEBUGFS
-               drv->dbgfs_op_mode = debugfs_create_dir(op->name,
-                                                       drv->dbgfs_drv);
-               dbgfs_dir = drv->dbgfs_op_mode;
+       drv->dbgfs_op_mode = debugfs_create_dir(op->name,
+                                               drv->dbgfs_drv);
+       dbgfs_dir = drv->dbgfs_op_mode;
 #endif
 
-               op_mode = ops->start(drv->trans, drv->trans->cfg,
-                                    &drv->fw, dbgfs_dir);
-
-               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);
+       op_mode = ops->start(drv->trans, drv->trans->cfg,
+                            &drv->fw, dbgfs_dir);
+       if (op_mode)
+               return op_mode;
 
 #ifdef CONFIG_IWLWIFI_DEBUGFS
-               debugfs_remove_recursive(drv->dbgfs_op_mode);
-               drv->dbgfs_op_mode = NULL;
+       debugfs_remove_recursive(drv->dbgfs_op_mode);
+       drv->dbgfs_op_mode = NULL;
 #endif
-       }
 
        return NULL;
 }
index 6a1d31892417b45fa24859b7ba7e133a5b8944cf..1549ff429549788173c769239d9ebcd118a9a302 100644 (file)
@@ -98,9 +98,6 @@ void iwl_drv_stop(struct iwl_drv *drv);
 #define VISIBLE_IF_IWLWIFI_KUNIT static
 #endif
 
-/* max retry for init flow */
-#define IWL_MAX_INIT_RETRY 2
-
 #define FW_NAME_PRE_BUFSIZE    64
 struct iwl_trans;
 const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf);
index 7f13dff04b265caf265f24662d7609f60289120d..6bbcf4092f52a111333b835a04eb11957391ec36 100644 (file)
@@ -1195,14 +1195,12 @@ int iwl_mvm_mac_start(struct ieee80211_hw *hw)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
        int ret;
-       int retry, max_retry = 0;
 
        mutex_lock(&mvm->mutex);
 
        /* we are starting the mac not in error flow, and restart is enabled */
        if (!test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status) &&
            iwlwifi_mod_params.fw_restart) {
-               max_retry = IWL_MAX_INIT_RETRY;
                /*
                 * This will prevent mac80211 recovery flows to trigger during
                 * init failures
@@ -1210,13 +1208,7 @@ int iwl_mvm_mac_start(struct ieee80211_hw *hw)
                set_bit(IWL_MVM_STATUS_STARTING, &mvm->status);
        }
 
-       for (retry = 0; retry <= max_retry; retry++) {
-               ret = __iwl_mvm_mac_start(mvm);
-               if (!ret || mvm->pldr_sync)
-                       break;
-
-               IWL_ERR(mvm, "mac start retry %d\n", retry);
-       }
+       ret = __iwl_mvm_mac_start(mvm);
        clear_bit(IWL_MVM_STATUS_STARTING, &mvm->status);
 
        mutex_unlock(&mvm->mutex);
This page took 0.073098 seconds and 4 git commands to generate.