summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/tt.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-07-01 18:38:38 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-07-21 10:43:13 +0300
commit576eeee9d3ab395f47462c03067c8b9381281f1d (patch)
treed8511410c9fcdb97ad4b06790b63d77f0c08bfbf /drivers/net/wireless/iwlwifi/mvm/tt.c
parent51ea1c7dbd4c5151b7f5777cabc505d43d2c42cb (diff)
downloadop-kernel-dev-576eeee9d3ab395f47462c03067c8b9381281f1d.zip
op-kernel-dev-576eeee9d3ab395f47462c03067c8b9381281f1d.tar.gz
iwlwifi: mvm: add some missing iwl_mvm_ref_sync() calls
Add iwl_mvm_ref_sync() calls (with new ref types) to flows that might access the device directly. These calls make sure the device is out of d0i3, and the bus is available for direct access. Since some of these functions are reentrant, convert the refs_bitmap to a ref counter, so multiple refs of the same type could be taken concurrently. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/tt.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tt.c b/drivers/net/wireless/iwlwifi/mvm/tt.c
index 0c4ff3a..0464599 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tt.c
@@ -338,10 +338,16 @@ static void check_exit_ctkill(struct work_struct *work)
duration = tt->params->ct_kill_duration;
+ /* make sure the device is available for direct read/writes */
+ if (iwl_mvm_ref_sync(mvm, IWL_MVM_REF_CHECK_CTKILL))
+ goto reschedule;
+
iwl_trans_start_hw(mvm->trans);
temp = check_nic_temperature(mvm);
iwl_trans_stop_device(mvm->trans);
+ iwl_mvm_unref(mvm, IWL_MVM_REF_CHECK_CTKILL);
+
if (temp < MIN_TEMPERATURE || temp > MAX_TEMPERATURE) {
IWL_DEBUG_TEMP(mvm, "Failed to measure NIC temperature\n");
goto reschedule;
OpenPOWER on IntegriCloud