Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51ea1c7d authored by Eytan Lifshitz's avatar Eytan Lifshitz Committed by Emmanuel Grumbach
Browse files

iwlwifi: mvm: fix wrong offset while reading from NVM



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: default avatarEytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 4b8265ab
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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) {