Lines Matching refs:tt

66 	struct iwl_tt_mgmt *tt = &priv->thermal_throttle;  in iwl_tt_is_low_power_state()  local
68 if (tt->state >= IWL_TI_1) in iwl_tt_is_low_power_state()
75 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_current_power_mode() local
77 return tt->tt_power_mode; in iwl_tt_current_power_mode()
82 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_ht_enabled() local
87 restriction = tt->restriction + tt->state; in iwl_ht_enabled()
118 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tx_ant_restriction() local
123 restriction = tt->restriction + tt->state; in iwl_tx_ant_restriction()
129 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_rx_ant_restriction() local
134 restriction = tt->restriction + tt->state; in iwl_rx_ant_restriction()
153 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_check_exit_ct_kill() local
158 if (tt->state == IWL_TI_CT_KILL) { in iwl_tt_check_exit_ct_kill()
203 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_ready_for_ct_kill() local
209 if (tt->state != IWL_TI_CT_KILL) { in iwl_tt_ready_for_ct_kill()
212 tt->state = IWL_TI_CT_KILL; in iwl_tt_ready_for_ct_kill()
243 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_legacy_tt_handler() local
247 if ((tt->tt_previous_temp) && in iwl_legacy_tt_handler()
248 (temp > tt->tt_previous_temp) && in iwl_legacy_tt_handler()
249 ((temp - tt->tt_previous_temp) > in iwl_legacy_tt_handler()
253 (temp - tt->tt_previous_temp)); in iwl_legacy_tt_handler()
256 old_state = tt->state; in iwl_legacy_tt_handler()
259 tt->state = IWL_TI_CT_KILL; in iwl_legacy_tt_handler()
261 tt->state = IWL_TI_2; in iwl_legacy_tt_handler()
263 tt->state = IWL_TI_1; in iwl_legacy_tt_handler()
265 tt->state = IWL_TI_0; in iwl_legacy_tt_handler()
268 tt->tt_previous_temp = temp; in iwl_legacy_tt_handler()
272 if (tt->state != old_state) { in iwl_legacy_tt_handler()
273 switch (tt->state) { in iwl_legacy_tt_handler()
282 tt->tt_power_mode = IWL_POWER_INDEX_3; in iwl_legacy_tt_handler()
285 tt->tt_power_mode = IWL_POWER_INDEX_4; in iwl_legacy_tt_handler()
288 tt->tt_power_mode = IWL_POWER_INDEX_5; in iwl_legacy_tt_handler()
294 if (tt->state != IWL_TI_CT_KILL && in iwl_legacy_tt_handler()
301 tt->state = old_state; in iwl_legacy_tt_handler()
305 if (tt->state == IWL_TI_CT_KILL) { in iwl_legacy_tt_handler()
311 tt->state = old_state; in iwl_legacy_tt_handler()
317 tt->state); in iwl_legacy_tt_handler()
319 tt->tt_power_mode); in iwl_legacy_tt_handler()
348 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_advance_tt_handler() local
354 old_state = tt->state; in iwl_advance_tt_handler()
366 transaction = tt->transaction + in iwl_advance_tt_handler()
371 if ((tt->tt_previous_temp) && in iwl_advance_tt_handler()
372 (temp > tt->tt_previous_temp) && in iwl_advance_tt_handler()
373 ((temp - tt->tt_previous_temp) > in iwl_advance_tt_handler()
378 (temp - tt->tt_previous_temp)); in iwl_advance_tt_handler()
380 tt->tt_previous_temp = temp; in iwl_advance_tt_handler()
385 tt->state = in iwl_advance_tt_handler()
394 if (tt->state >= IWL_TI_1) { in iwl_advance_tt_handler()
396 tt->tt_power_mode = IWL_POWER_INDEX_5; in iwl_advance_tt_handler()
434 if (tt->state != IWL_TI_CT_KILL && in iwl_advance_tt_handler()
443 tt->state = old_state; in iwl_advance_tt_handler()
447 tt->state); in iwl_advance_tt_handler()
449 tt->state == IWL_TI_CT_KILL) { in iwl_advance_tt_handler()
456 tt->state = old_state; in iwl_advance_tt_handler()
460 tt->state != IWL_TI_CT_KILL) { in iwl_advance_tt_handler()
482 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_bg_ct_enter() local
490 if (tt->state != IWL_TI_CT_KILL) { in iwl_bg_ct_enter()
511 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_bg_ct_exit() local
522 if (tt->state == IWL_TI_CT_KILL) { in iwl_bg_ct_exit()
589 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_initialize() local
595 memset(tt, 0, sizeof(struct iwl_tt_mgmt)); in iwl_tt_initialize()
597 tt->state = IWL_TI_0; in iwl_tt_initialize()
609 tt->restriction = kcalloc(IWL_TI_STATE_MAX, in iwl_tt_initialize()
612 tt->transaction = kcalloc(IWL_TI_STATE_MAX * in iwl_tt_initialize()
616 if (!tt->restriction || !tt->transaction) { in iwl_tt_initialize()
619 kfree(tt->restriction); in iwl_tt_initialize()
620 tt->restriction = NULL; in iwl_tt_initialize()
621 kfree(tt->transaction); in iwl_tt_initialize()
622 tt->transaction = NULL; in iwl_tt_initialize()
624 transaction = tt->transaction + in iwl_tt_initialize()
627 transaction = tt->transaction + in iwl_tt_initialize()
630 transaction = tt->transaction + in iwl_tt_initialize()
633 transaction = tt->transaction + in iwl_tt_initialize()
638 memcpy(tt->restriction, in iwl_tt_initialize()
651 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_exit() local
663 kfree(tt->restriction); in iwl_tt_exit()
664 tt->restriction = NULL; in iwl_tt_exit()
665 kfree(tt->transaction); in iwl_tt_exit()
666 tt->transaction = NULL; in iwl_tt_exit()