diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-09-21 11:58:05 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-25 09:15:00 +0200 |
commit | 6185e1e5b4d0a7bb78de0d4b2951e1d396fc67a0 (patch) | |
tree | f4bcc89c626c9860f1d2ab9eb18612c30904af21 /drivers/net/wireless/intel/iwlwifi/pcie/trans.c | |
parent | 0c4aa7a12a5a96604c809092ae9a94891b4f230a (diff) |
wifi: iwlwifi: fail NIC access fast on dead NIC
If the NIC is already dead, as detected by the transport then
there's no point to try to grab the NIC access and time out,
we can just fail fast. This may speed up recovery.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230921110726.f3d8498c5a60.I5d0c442a731ca4c00716910d215b4bcde6963a65@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/pcie/trans.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 5020ae4493c6..385e152f04fe 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -2177,6 +2177,9 @@ bool __iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans) CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP; u32 poll = CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN; + if (test_bit(STATUS_TRANS_DEAD, &trans->status)) + return false; + spin_lock(&trans_pcie->reg_lock); if (trans_pcie->cmd_hold_nic_awake) |