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

Commit 02883562 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

iwlagn: remove Kelvin support



Only 5150 series devices report their temperature
in Kelvin, and for those we already convert it to
Celsius when storing into priv->temperature, so
there's no way priv->temperature will ever be in
Kelvin. Remove support for this.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 325a7ddf
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -114,9 +114,6 @@ static bool iwl_within_ct_kill_margin(struct iwl_priv *priv)
	s32 temp = priv->temperature; /* degrees CELSIUS except specified */
	s32 temp = priv->temperature; /* degrees CELSIUS except specified */
	bool within_margin = false;
	bool within_margin = false;


	if (priv->cfg->base_params->temperature_kelvin)
		temp = KELVIN_TO_CELSIUS(priv->temperature);

	if (!priv->thermal_throttle.advanced_tt)
	if (!priv->thermal_throttle.advanced_tt)
		within_margin = ((temp + IWL_TT_CT_KILL_MARGIN) >=
		within_margin = ((temp + IWL_TT_CT_KILL_MARGIN) >=
				CT_KILL_THRESHOLD_LEGACY) ? true : false;
				CT_KILL_THRESHOLD_LEGACY) ? true : false;
@@ -591,9 +588,6 @@ static void iwl_bg_tt_work(struct work_struct *work)
	if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
	if (test_bit(STATUS_EXIT_PENDING, &priv->shrd->status))
		return;
		return;


	if (priv->cfg->base_params->temperature_kelvin)
		temp = KELVIN_TO_CELSIUS(priv->temperature);

	if (!priv->thermal_throttle.advanced_tt)
	if (!priv->thermal_throttle.advanced_tt)
		iwl_legacy_tt_handler(priv, temp, false);
		iwl_legacy_tt_handler(priv, temp, false);
	else
	else
+0 −2
Original line number Original line Diff line number Diff line
@@ -108,7 +108,6 @@ struct iwl_lib_ops {
 *	radio tuning when there is a high receiving plcp error rate
 *	radio tuning when there is a high receiving plcp error rate
 * @chain_noise_scale: default chain noise scale used for gain computation
 * @chain_noise_scale: default chain noise scale used for gain computation
 * @wd_timeout: TX queues watchdog timeout
 * @wd_timeout: TX queues watchdog timeout
 * @temperature_kelvin: temperature report by uCode in kelvin
 * @max_event_log_size: size of event log buffer size for ucode event logging
 * @max_event_log_size: size of event log buffer size for ucode event logging
 * @shadow_reg_enable: HW shadhow register bit
 * @shadow_reg_enable: HW shadhow register bit
 * @no_idle_support: do not support idle mode
 * @no_idle_support: do not support idle mode
@@ -130,7 +129,6 @@ struct iwl_base_params {
	u8 plcp_delta_threshold;
	u8 plcp_delta_threshold;
	s32 chain_noise_scale;
	s32 chain_noise_scale;
	unsigned int wd_timeout;
	unsigned int wd_timeout;
	bool temperature_kelvin;
	u32 max_event_log_size;
	u32 max_event_log_size;
	const bool shadow_reg_enable;
	const bool shadow_reg_enable;
	const bool no_idle_support;
	const bool no_idle_support;
+1 −1
Original line number Original line Diff line number Diff line
@@ -877,7 +877,7 @@ struct iwl_priv {
	u8 channel_count;	/* # of channels */
	u8 channel_count;	/* # of channels */


	/* thermal calibration */
	/* thermal calibration */
	s32 temperature;	/* degrees Kelvin */
	s32 temperature;	/* Celsius */
	s32 last_temperature;
	s32 last_temperature;


	/* init calibration results */
	/* init calibration results */