Skip to content

Commit dfdfe4b

Browse files
committed
wifi: iwlwifi: remove retry loops in start
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]>
1 parent de0c2cd commit dfdfe4b

File tree

3 files changed

+10
-31
lines changed

3 files changed

+10
-31
lines changed

drivers/net/wireless/intel/iwlwifi/iwl-drv.c

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,35 +1423,25 @@ _iwl_op_mode_start(struct iwl_drv *drv, struct iwlwifi_opmode_table *op)
14231423
const struct iwl_op_mode_ops *ops = op->ops;
14241424
struct dentry *dbgfs_dir = NULL;
14251425
struct iwl_op_mode *op_mode = NULL;
1426-
int retry, max_retry = !!iwlwifi_mod_params.fw_restart * IWL_MAX_INIT_RETRY;
14271426

14281427
/* also protects start/stop from racing against each other */
14291428
lockdep_assert_held(&iwlwifi_opmode_table_mtx);
14301429

1431-
for (retry = 0; retry <= max_retry; retry++) {
1432-
14331430
#ifdef CONFIG_IWLWIFI_DEBUGFS
1434-
drv->dbgfs_op_mode = debugfs_create_dir(op->name,
1435-
drv->dbgfs_drv);
1436-
dbgfs_dir = drv->dbgfs_op_mode;
1431+
drv->dbgfs_op_mode = debugfs_create_dir(op->name,
1432+
drv->dbgfs_drv);
1433+
dbgfs_dir = drv->dbgfs_op_mode;
14371434
#endif
14381435

1439-
op_mode = ops->start(drv->trans, drv->trans->cfg,
1440-
&drv->fw, dbgfs_dir);
1441-
1442-
if (op_mode)
1443-
return op_mode;
1444-
1445-
if (test_bit(STATUS_TRANS_DEAD, &drv->trans->status))
1446-
break;
1447-
1448-
IWL_ERR(drv, "retry init count %d\n", retry);
1436+
op_mode = ops->start(drv->trans, drv->trans->cfg,
1437+
&drv->fw, dbgfs_dir);
1438+
if (op_mode)
1439+
return op_mode;
14491440

14501441
#ifdef CONFIG_IWLWIFI_DEBUGFS
1451-
debugfs_remove_recursive(drv->dbgfs_op_mode);
1452-
drv->dbgfs_op_mode = NULL;
1442+
debugfs_remove_recursive(drv->dbgfs_op_mode);
1443+
drv->dbgfs_op_mode = NULL;
14531444
#endif
1454-
}
14551445

14561446
return NULL;
14571447
}

drivers/net/wireless/intel/iwlwifi/iwl-drv.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ void iwl_drv_stop(struct iwl_drv *drv);
9898
#define VISIBLE_IF_IWLWIFI_KUNIT static
9999
#endif
100100

101-
/* max retry for init flow */
102-
#define IWL_MAX_INIT_RETRY 2
103-
104101
#define FW_NAME_PRE_BUFSIZE 64
105102
struct iwl_trans;
106103
const char *iwl_drv_get_fwname_pre(struct iwl_trans *trans, char *buf);

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,28 +1195,20 @@ int iwl_mvm_mac_start(struct ieee80211_hw *hw)
11951195
{
11961196
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
11971197
int ret;
1198-
int retry, max_retry = 0;
11991198

12001199
mutex_lock(&mvm->mutex);
12011200

12021201
/* we are starting the mac not in error flow, and restart is enabled */
12031202
if (!test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status) &&
12041203
iwlwifi_mod_params.fw_restart) {
1205-
max_retry = IWL_MAX_INIT_RETRY;
12061204
/*
12071205
* This will prevent mac80211 recovery flows to trigger during
12081206
* init failures
12091207
*/
12101208
set_bit(IWL_MVM_STATUS_STARTING, &mvm->status);
12111209
}
12121210

1213-
for (retry = 0; retry <= max_retry; retry++) {
1214-
ret = __iwl_mvm_mac_start(mvm);
1215-
if (!ret || mvm->pldr_sync)
1216-
break;
1217-
1218-
IWL_ERR(mvm, "mac start retry %d\n", retry);
1219-
}
1211+
ret = __iwl_mvm_mac_start(mvm);
12201212
clear_bit(IWL_MVM_STATUS_STARTING, &mvm->status);
12211213

12221214
mutex_unlock(&mvm->mutex);

0 commit comments

Comments
 (0)