aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2018-05-01 07:23:56 -0400
committerLuca Coelho <luciano.coelho@intel.com>2018-08-31 04:38:31 -0400
commitf60c9e591b058af18b45f8e222d7b40cf3c001cb (patch)
tree4465273fccf427772d5adf56fd035a75621ac7ad /drivers/net/wireless/intel/iwlwifi/mvm/ops.c
parent50f067b35684dbc5dfe81683c6e381e8eb7da3fb (diff)
iwlwifi: improve the flow when a NIC is disconnected
When the NIC is disconnected, we just can't do anything besides seeking for help from the bus driver. Dumping the device's memory is not necessary and just bloats the logs with unusable data. Moreover, asking mac80211 to restart the hardware is also useless. Bypass all this. Also, use the STATUS_TRANS_DEAD status bit instead of a bool inside the transport layer. The advantage of this is that now, the transport and the op_mode can know what is the situation and bypass the useless recovery steps mentioned above. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index d275832dbb14..da1aafb71298 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -1254,7 +1254,8 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
1254 INIT_WORK(&reprobe->work, iwl_mvm_reprobe_wk); 1254 INIT_WORK(&reprobe->work, iwl_mvm_reprobe_wk);
1255 schedule_work(&reprobe->work); 1255 schedule_work(&reprobe->work);
1256 } else if (mvm->fwrt.cur_fw_img == IWL_UCODE_REGULAR && 1256 } else if (mvm->fwrt.cur_fw_img == IWL_UCODE_REGULAR &&
1257 mvm->hw_registered) { 1257 mvm->hw_registered &&
1258 !test_bit(STATUS_TRANS_DEAD, &mvm->trans->status)) {
1258 /* don't let the transport/FW power down */ 1259 /* don't let the transport/FW power down */
1259 iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN); 1260 iwl_mvm_ref(mvm, IWL_MVM_REF_UCODE_DOWN);
1260 1261
@@ -1269,7 +1270,8 @@ static void iwl_mvm_nic_error(struct iwl_op_mode *op_mode)
1269{ 1270{
1270 struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); 1271 struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
1271 1272
1272 iwl_mvm_dump_nic_error_log(mvm); 1273 if (!test_bit(STATUS_TRANS_DEAD, &mvm->trans->status))
1274 iwl_mvm_dump_nic_error_log(mvm);
1273 1275
1274 iwl_mvm_nic_restart(mvm, true); 1276 iwl_mvm_nic_restart(mvm, true);
1275} 1277}