summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/tt.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-06-28 13:18:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-06-28 13:18:21 -0400
commit57ed5cd695d7373b8ae0ae9f10fe945e774d58f0 (patch)
tree7ee6244ea7c0be81a541d4e57783f83c4dfd7d66 /drivers/net/wireless/iwlwifi/mvm/tt.c
parent5e6700b3bf98fe98d630bf9c939ad4c85ce95592 (diff)
parent0f817ed52d07873cd39c9d3f6d87fae962dc742f (diff)
downloadblackbird-obmc-linux-57ed5cd695d7373b8ae0ae9f10fe945e774d58f0.tar.gz
blackbird-obmc-linux-57ed5cd695d7373b8ae0ae9f10fe945e774d58f0.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts: net/wireless/nl80211.c
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/tt.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tt.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tt.c b/drivers/net/wireless/iwlwifi/mvm/tt.c
index a7e3b8ddf22b..d6ae7f16ac11 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tt.c
@@ -427,6 +427,7 @@ void iwl_mvm_tt_handler(struct iwl_mvm *mvm)
const struct iwl_tt_params *params = mvm->thermal_throttle.params;
struct iwl_mvm_tt_mgmt *tt = &mvm->thermal_throttle;
s32 temperature = mvm->temperature;
+ bool throttle_enable = false;
int i;
u32 tx_backoff;
@@ -445,6 +446,7 @@ void iwl_mvm_tt_handler(struct iwl_mvm *mvm)
ieee80211_iterate_active_interfaces_atomic(
mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
iwl_mvm_tt_smps_iterator, mvm);
+ throttle_enable = true;
} else if (tt->dynamic_smps &&
temperature <= params->dynamic_smps_exit) {
IWL_DEBUG_TEMP(mvm, "Disable dynamic SMPS\n");
@@ -456,10 +458,12 @@ void iwl_mvm_tt_handler(struct iwl_mvm *mvm)
}
if (params->support_tx_protection) {
- if (temperature >= params->tx_protection_entry)
+ if (temperature >= params->tx_protection_entry) {
iwl_mvm_tt_tx_protection(mvm, true);
- else if (temperature <= params->tx_protection_exit)
+ throttle_enable = true;
+ } else if (temperature <= params->tx_protection_exit) {
iwl_mvm_tt_tx_protection(mvm, false);
+ }
}
if (params->support_tx_backoff) {
@@ -469,9 +473,22 @@ void iwl_mvm_tt_handler(struct iwl_mvm *mvm)
break;
tx_backoff = params->tx_backoff[i].backoff;
}
+ if (tx_backoff != 0)
+ throttle_enable = true;
if (tt->tx_backoff != tx_backoff)
iwl_mvm_tt_tx_backoff(mvm, tx_backoff);
}
+
+ if (!tt->throttle && throttle_enable) {
+ IWL_WARN(mvm,
+ "Due to high temperature thermal throttling initiated\n");
+ tt->throttle = true;
+ } else if (tt->throttle && !tt->dynamic_smps && tt->tx_backoff == 0 &&
+ temperature <= params->tx_protection_exit) {
+ IWL_WARN(mvm,
+ "Temperature is back to normal thermal throttling stopped\n");
+ tt->throttle = false;
+ }
}
static const struct iwl_tt_params iwl7000_tt_params = {
@@ -502,6 +519,7 @@ void iwl_mvm_tt_initialize(struct iwl_mvm *mvm)
IWL_DEBUG_TEMP(mvm, "Initialize Thermal Throttling\n");
tt->params = &iwl7000_tt_params;
+ tt->throttle = false;
INIT_DELAYED_WORK(&tt->ct_kill_exit, check_exit_ctkill);
}
OpenPOWER on IntegriCloud