aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/fw-api.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-09-04 05:29:15 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-14 06:06:40 -0400
commita0a09243e02e0ad6a366139093d80b870ec9a16e (patch)
treea5027bca0554298925f89297ae1c0814cf54d71d /drivers/net/wireless/iwlwifi/mvm/fw-api.h
parent34e611ea2a9d88ccf77b2a073ab9b0c53e58e6f8 (diff)
iwlwifi: mvm: use the firmware to get the temperature during CT kill
Reading the temperature directly from the hardware, without the help of the firmware, is a complex process and is not entirely the same for different hardware. Also, some NICs don't easily allow access to the sensors when the firmware is not running, which would add even more complexity to the code. To reduce the code complexity and to avoid code duplication between the firmware and the driver, boot the firmware briefly to read the current temperature while in CT kill mode. Signed-off-by: Luciano Coelho <luciano.coelho@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/mvm/fw-api.h')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api.h b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
index b599b5288982..fbcc036b1e44 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
@@ -205,6 +205,10 @@ enum {
205 REPLY_SF_CFG_CMD = 0xd1, 205 REPLY_SF_CFG_CMD = 0xd1,
206 REPLY_BEACON_FILTERING_CMD = 0xd2, 206 REPLY_BEACON_FILTERING_CMD = 0xd2,
207 207
208 /* DTS measurements */
209 CMD_DTS_MEASUREMENT_TRIGGER = 0xdc,
210 DTS_MEASUREMENT_NOTIFICATION = 0xdd,
211
208 REPLY_DEBUG_CMD = 0xf0, 212 REPLY_DEBUG_CMD = 0xf0,
209 DEBUG_LOG_MSG = 0xf7, 213 DEBUG_LOG_MSG = 0xf7,
210 214
@@ -1618,4 +1622,32 @@ struct iwl_sf_cfg_cmd {
1618 __le32 full_on_timeouts[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES]; 1622 __le32 full_on_timeouts[SF_NUM_SCENARIO][SF_NUM_TIMEOUT_TYPES];
1619} __packed; /* SF_CFG_API_S_VER_2 */ 1623} __packed; /* SF_CFG_API_S_VER_2 */
1620 1624
1625/* DTS measurements */
1626
1627enum iwl_dts_measurement_flags {
1628 DTS_TRIGGER_CMD_FLAGS_TEMP = BIT(0),
1629 DTS_TRIGGER_CMD_FLAGS_VOLT = BIT(1),
1630};
1631
1632/**
1633 * iwl_dts_measurement_cmd - request DTS temperature and/or voltage measurements
1634 *
1635 * @flags: indicates which measurements we want as specified in &enum
1636 * iwl_dts_measurement_flags
1637 */
1638struct iwl_dts_measurement_cmd {
1639 __le32 flags;
1640} __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_CMD_S */
1641
1642/**
1643 * iwl_dts_measurement_notif - notification received with the measurements
1644 *
1645 * @temp: the measured temperature
1646 * @voltage: the measured voltage
1647 */
1648struct iwl_dts_measurement_notif {
1649 __le32 temp;
1650 __le32 voltage;
1651} __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S */
1652
1621#endif /* __fw_api_h__ */ 1653#endif /* __fw_api_h__ */