iwlwifi: mvm: fix wrong offset while reading from NVM
authorEytan Lifshitz <eytan.lifshitz@intel.com>
Wed, 2 Jul 2014 17:52:02 +0000 (20:52 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 21 Jul 2014 07:43:13 +0000 (10:43 +0300)
As part of thermal throttling, some data is being read from NVM.
The offset is in words, but was addressed as in octets. fixed.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/tt.c

index 868561512783956617f5cae55d294f7c5207918d..0c4ff3a57ade589c19d937e68610888b824d1ae5 100644 (file)
@@ -140,9 +140,9 @@ static u16 iwl_mvm_dts_get_ptat_deviation_offset(struct iwl_mvm *mvm)
 
        /* TODO: move parsing to NVM code */
        calib = mvm->nvm_sections[NVM_SECTION_TYPE_CALIBRATION].data;
-       ptat = calib[OTP_DTS_DIODE_DEVIATION];
-       pa1 = calib[OTP_DTS_DIODE_DEVIATION + 1];
-       pa2 = calib[OTP_DTS_DIODE_DEVIATION + 2];
+       ptat = calib[OTP_DTS_DIODE_DEVIATION * 2];
+       pa1 = calib[OTP_DTS_DIODE_DEVIATION * 2 + 1];
+       pa2 = calib[OTP_DTS_DIODE_DEVIATION * 2 + 2];
 
        /* get the median: */
        if (ptat > pa1) {