]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
iwlwifi: trans: consider firmware dead after errors
authorJohannes Berg <johannes.berg@intel.com>
Wed, 9 Dec 2020 21:16:36 +0000 (23:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Dec 2020 22:14:20 +0000 (00:14 +0200)
If we get an error, no longer consider the firmware to be
in IWL_TRANS_FW_ALIVE state.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.a9d01e79c1c7.Ib2deb076b392fb516a7230bac91d7ab8a9586d86@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-trans.h

index b84921e1556c7d4d7b44c82fc0f999a6f8a62d6d..83d06fb8beca2e0c5b7a4d2c9e14da2f8747935f 100644 (file)
@@ -1439,8 +1439,10 @@ static inline void iwl_trans_fw_error(struct iwl_trans *trans)
                return;
 
        /* prevent double restarts due to the same erroneous FW */
-       if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status))
+       if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status)) {
                iwl_op_mode_nic_error(trans->op_mode);
+               trans->state = IWL_TRANS_NO_FW;
+       }
 }
 
 static inline bool iwl_trans_fw_running(struct iwl_trans *trans)