aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2017-03-16 13:00:59 +0200
committerLuca Coelho <luciano.coelho@intel.com>2017-06-05 23:29:32 +0300
commitde8ba41b5e5002e28756963df311246485c330d5 (patch)
tree2457839f1e2ee771e2666cce23a4aaac17488aa8 /drivers/net/wireless/intel/iwlwifi/mvm/tt.c
parentiwlwifi: mvm: add TLV for NAN API differentiation (diff)
downloadlinux-dev-de8ba41b5e5002e28756963df311246485c330d5.tar.xz
linux-dev-de8ba41b5e5002e28756963df311246485c330d5.zip
iwlwifi: mvm: support init flow debugging
In case an assert happens on init flow, the current driver powers down the NIC, except if iwlmvm modparam init_dbg=1, and only on very specific flows. Extend this capability to cover most failure cases by keeping track of what init configurations have been completed. This way, we can allow NOT powering down the NIC, while making sure that when the driver is removed we don't try to free resources that haven't been allocated. (This can result in a kernel panic.) Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/tt.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
index f9cbd197246f..4e03ea911a1f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
@@ -882,10 +882,14 @@ void iwl_mvm_thermal_initialize(struct iwl_mvm *mvm, u32 min_backoff)
iwl_mvm_cooling_device_register(mvm);
iwl_mvm_thermal_zone_register(mvm);
#endif
+ mvm->init_status |= IWL_MVM_INIT_STATUS_THERMAL_INIT_COMPLETE;
}
void iwl_mvm_thermal_exit(struct iwl_mvm *mvm)
{
+ if (!(mvm->init_status & IWL_MVM_INIT_STATUS_THERMAL_INIT_COMPLETE))
+ return;
+
cancel_delayed_work_sync(&mvm->thermal_throttle.ct_kill_exit);
IWL_DEBUG_TEMP(mvm, "Exit Thermal Throttling\n");
@@ -893,4 +897,5 @@ void iwl_mvm_thermal_exit(struct iwl_mvm *mvm)
iwl_mvm_cooling_device_unregister(mvm);
iwl_mvm_thermal_zone_unregister(mvm);
#endif
+ mvm->init_status &= ~IWL_MVM_INIT_STATUS_THERMAL_INIT_COMPLETE;
}