summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-config.h
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2014-01-16 21:12:02 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-02-03 22:23:38 +0200
commit0c0e2c71b4da1818693acd73d49c4971283c8e72 (patch)
treeb7650106a27245d5559110158afa9136d95d1c15 /drivers/net/wireless/iwlwifi/iwl-config.h
parentbcb079a14d75b6e1ed762b194fe04dc5d3f96d7e (diff)
downloadop-kernel-dev-0c0e2c71b4da1818693acd73d49c4971283c8e72.zip
op-kernel-dev-0c0e2c71b4da1818693acd73d49c4971283c8e72.tar.gz
iwlwifi: mvm: handle platform PCIe power limitation
The tx backoff settings used by the thermal throttling mechanism can also be used for enforcing a limit on the power consumption of the module. Handle the platform PCIe power limitation by translating the limit (measured in mw) to its respective tx backoff value. The translation is module specific. The resulting tx backoff value is sent to the ucode, and also serves as the minimal backoff value that can be set by the thermal throttling mechanism. Signed-off-by: Ido Yariv <idox.yariv@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-config.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-config.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h
index df7d409..456fcca 100644
--- a/drivers/net/wireless/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/iwlwifi/iwl-config.h
@@ -193,6 +193,15 @@ struct iwl_eeprom_params {
bool enhanced_txpower;
};
+/* Tx-backoff power threshold
+ * @pwr: The power limit in mw
+ * @backoff: The tx-backoff in uSec
+ */
+struct iwl_pwr_tx_backoff {
+ u32 pwr;
+ u32 backoff;
+};
+
/**
* struct iwl_cfg
* @name: Offical name of the device
@@ -219,6 +228,7 @@ struct iwl_eeprom_params {
* @host_interrupt_operation_mode: device needs host interrupt operation
* mode set
* @nvm_hw_section_num: the ID of the HW NVM section
+ * @pwr_tx_backoffs: translation table between power limits and backoffs
*
* We enable the driver to be backward compatible wrt. hardware features.
* API differences in uCode shouldn't be handled here but through TLVs
@@ -250,6 +260,7 @@ struct iwl_cfg {
const bool host_interrupt_operation_mode;
bool high_temp;
u8 nvm_hw_section_num;
+ const struct iwl_pwr_tx_backoff *pwr_tx_backoffs;
};
/*
OpenPOWER on IntegriCloud