]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: mvm: remove STARTING state
authorJohannes Berg <johannes.berg@intel.com>
Fri, 27 Dec 2024 08:01:07 +0000 (10:01 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jan 2025 14:26:39 +0000 (15:26 +0100)
Now that the retry loop only happens when timeouts occur
and firmware errors are different, we no longer need the
STARTING state with all the infrastructure for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241227095718.c55d73436521.I08e9f6a71d56f86872bca4d4e3048faa113a7120@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index cc2f3c0b04a8094de89573186413f629b2031b7a..5b75288991ee686ab8121d9a89fcc6464e131b71 100644 (file)
@@ -1300,14 +1300,8 @@ int iwl_mvm_mac_start(struct ieee80211_hw *hw)
 
        /* 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) {
+           iwlwifi_mod_params.fw_restart)
                max_retry = IWL_MAX_INIT_RETRY;
-               /*
-                * This will prevent mac80211 recovery flows to trigger during
-                * init failures
-                */
-               set_bit(IWL_MVM_STATUS_STARTING, &mvm->status);
-       }
 
        for (retry = 0; retry <= max_retry; retry++) {
                ret = __iwl_mvm_mac_start(mvm);
@@ -1316,7 +1310,6 @@ int iwl_mvm_mac_start(struct ieee80211_hw *hw)
 
                IWL_ERR(mvm, "mac start retry %d\n", retry);
        }
-       clear_bit(IWL_MVM_STATUS_STARTING, &mvm->status);
 
        mutex_unlock(&mvm->mutex);
 
index 2ad615293c75a1c46ae163f36e71974707b8f9f9..d0ba9e0f15b7da95070a059243460d8fddb3c25e 100644 (file)
@@ -1401,8 +1401,6 @@ DEFINE_GUARD(mvm, struct iwl_mvm *, mutex_lock(&_T->mutex), mutex_unlock(&_T->mu
  * @IWL_MVM_STATUS_IN_D3: in D3 (or at least about to go into it)
  * @IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE: suppress one error log
  *     if this is set, when intentionally triggered
- * @IWL_MVM_STATUS_STARTING: starting mac,
- *     used to disable restart flow while in STARTING state
  */
 enum iwl_mvm_status {
        IWL_MVM_STATUS_HW_RFKILL,
@@ -1414,7 +1412,6 @@ enum iwl_mvm_status {
        IWL_MVM_STATUS_FIRMWARE_RUNNING,
        IWL_MVM_STATUS_IN_D3,
        IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE,
-       IWL_MVM_STATUS_STARTING,
 };
 
 struct iwl_mvm_csme_conn_info {
index 623122cadd32da46a5f6109177dfce9793b72338..de815504183c745de0d27df9edc54231d82b1773 100644 (file)
@@ -2051,9 +2051,6 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
         */
        if (!mvm->fw_restart && fw_error) {
                iwl_fw_error_collect(&mvm->fwrt, false);
-       } else if (test_bit(IWL_MVM_STATUS_STARTING,
-                           &mvm->status)) {
-               IWL_ERR(mvm, "Starting mac, retry will be triggered anyway\n");
        } else if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
                struct iwl_mvm_reprobe *reprobe;