iwlagn: generic temperature location in EEPROM
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Mon, 6 Jun 2011 21:26:41 +0000 (14:26 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Sat, 11 Jun 2011 14:10:48 +0000 (07:10 -0700)
Temperature location in EEPROM is generic to all devices

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-5000-hw.h
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c
drivers/net/wireless/iwlwifi/iwl-eeprom.h

index 05ad47628b63cc170676f417969b782cfad3740a..f9630a3c79fe996c26093954f2938129cd6e2a89 100644 (file)
@@ -75,7 +75,7 @@ static inline s32 iwl_temp_calib_to_offset(struct iwl_priv *priv)
 {
        u16 temperature, voltage;
        __le16 *temp_calib =
-               (__le16 *)iwl_eeprom_query_addr(priv, EEPROM_5000_TEMPERATURE);
+               (__le16 *)iwl_eeprom_query_addr(priv, EEPROM_TEMPERATURE);
 
        temperature = le16_to_cpu(temp_calib[0]);
        voltage = le16_to_cpu(temp_calib[1]);
index e916157bd1450366205dd1121dec116c1eb1aca1..4be7a0f7174fc5d07db4e3cd859a54e9aee1970e 100644 (file)
@@ -197,7 +197,7 @@ static int iwlagn_set_temperature_offset_calib(struct iwl_priv *priv)
 {
        struct iwl_calib_temperature_offset_cmd cmd;
        __le16 *offset_calib =
-               (__le16 *)iwl_eeprom_query_addr(priv, EEPROM_5000_TEMPERATURE);
+               (__le16 *)iwl_eeprom_query_addr(priv, EEPROM_TEMPERATURE);
        cmd.hdr.op_code = IWL_PHY_CALIBRATE_TEMP_OFFSET_CMD;
        cmd.hdr.first_group = 0;
        cmd.hdr.groups_num = 1;
index 2d7005385be7e60e23a82c4e9634127f5c4d3e00..3dcb0a05d357af00d84239dd11e82e9820790304 100644 (file)
@@ -166,12 +166,12 @@ struct iwl_eeprom_enhanced_txpwr {
 #define EEPROM_5000_TX_POWER_VERSION    (4)
 #define EEPROM_5000_EEPROM_VERSION     (0x11A)
 
-/* 5000 and up calibration */
+/* calibration */
 #define EEPROM_CALIB_ALL       (INDIRECT_ADDRESS | INDIRECT_CALIBRATION)
 #define EEPROM_XTAL            ((2*0x128) | EEPROM_CALIB_ALL)
 
-/* 5000 temperature */
-#define EEPROM_5000_TEMPERATURE ((2*0x12A) | EEPROM_CALIB_ALL)
+/* temperature */
+#define EEPROM_TEMPERATURE ((2*0x12A) | EEPROM_CALIB_ALL)
 
 /* agn links */
 #define EEPROM_LINK_HOST             (2*0x64)