diff options
author | Eytan Lifshitz <eytan.lifshitz@intel.com> | 2013-05-19 16:14:41 (GMT) |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-29 07:03:18 (GMT) |
commit | 9ee718aa9269cf56040cf12f0f6ac6e0057397b2 (patch) | |
tree | 5d4b9d8bb7b16f758ea0d6c8a4c85e87f4681600 /drivers/net/wireless/iwlwifi/mvm/rx.c | |
parent | f68d18f202d50f60746a8bcce1dc965b2f5035c0 (diff) | |
download | linux-fsl-qoriq-9ee718aa9269cf56040cf12f0f6ac6e0057397b2.tar.xz |
iwlwifi: mvm: add thermal throttling and CT kill
In order to avoid NIC destruction due to high temperature,
CT kill will power down the NIC.
To avoid this, thermal throttling will decrease throughput
to prevent the NIC from reaching the temperature at which
CT kill is performed.
Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rx.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c index 4dfc21a..e4930d5 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/iwlwifi/mvm/rx.c @@ -363,3 +363,25 @@ int iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, rxb, &rx_status); return 0; } + +/* + * iwl_mvm_rx_statistics - STATISTICS_NOTIFICATION handler + * + * TODO: This handler is implemented partially. + * It only gets the NIC's temperature. + */ +int iwl_mvm_rx_statistics(struct iwl_mvm *mvm, + struct iwl_rx_cmd_buffer *rxb, + struct iwl_device_cmd *cmd) +{ + struct iwl_rx_packet *pkt = rxb_addr(rxb); + struct iwl_notif_statistics *stats = (void *)&pkt->data; + struct mvm_statistics_general_common *common = &stats->general.common; + + if (mvm->temperature != le32_to_cpu(common->temperature)) { + mvm->temperature = le32_to_cpu(common->temperature); + iwl_mvm_tt_handler(mvm); + } + + return 0; +} |