summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-04-09 17:46:58 -0700
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 15:06:09 -0400
commit11483b5c2296cb318140f8b4ff9148faab0209d0 (patch)
treeac24fbd7e8693f21c4f503b216fcc84bdf83a3ed /drivers/net/wireless/iwlwifi/iwl-5000.c
parent48dffd397ec13e7fb4a52b77e8b07ed8ea12a938 (diff)
iwlwifi: move eeprom into priv
The whole code around eeprom is distributed across whole bunch of different files, most of which belong to the to-be-DVM code. As a result, it is currently very hard to split out the EEPROM code to be generic. However, it is also quite unlikely that the current EEPROM code will be needed by the MVM code as that has different mechanisms to query the EEPROM (it does so through the uCode.) So, at least temporarily, move everything into priv. If it becomes necessary to use the code from MVM, we will have to split it out, but then it's also easier since we'll know what pieces we need. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 8870370e0da3..056d55242f81 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -126,10 +126,10 @@ static struct iwl_sensitivity_ranges iwl5150_sensitivity = {
#define IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF (-5)
-static s32 iwl_temp_calib_to_offset(struct iwl_shared *shrd)
+static s32 iwl_temp_calib_to_offset(struct iwl_priv *priv)
{
u16 temperature, voltage;
- __le16 *temp_calib = (__le16 *)iwl_eeprom_query_addr(shrd,
+ __le16 *temp_calib = (__le16 *)iwl_eeprom_query_addr(priv,
EEPROM_KELVIN_TEMPERATURE);
temperature = le16_to_cpu(temp_calib[0]);
@@ -143,7 +143,7 @@ static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
{
const s32 volt2temp_coef = IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF;
s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) -
- iwl_temp_calib_to_offset(priv->shrd);
+ iwl_temp_calib_to_offset(priv);
priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
}
@@ -189,7 +189,7 @@ static void iwl5150_hw_set_hw_params(struct iwl_priv *priv)
static void iwl5150_temperature(struct iwl_priv *priv)
{
u32 vt = 0;
- s32 offset = iwl_temp_calib_to_offset(priv->shrd);
+ s32 offset = iwl_temp_calib_to_offset(priv);
vt = le32_to_cpu(priv->statistics.common.temperature);
vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;