Lines Matching refs:tt
84 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_is_low_power_state() local
86 if (tt->state >= IWL_TI_1) in iwl_tt_is_low_power_state()
93 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_current_power_mode() local
95 return tt->tt_power_mode; in iwl_tt_current_power_mode()
100 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_ht_enabled() local
105 restriction = tt->restriction + tt->state; in iwl_ht_enabled()
136 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tx_ant_restriction() local
141 restriction = tt->restriction + tt->state; in iwl_tx_ant_restriction()
147 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_rx_ant_restriction() local
152 restriction = tt->restriction + tt->state; in iwl_rx_ant_restriction()
170 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_check_exit_ct_kill() local
176 if (tt->state == IWL_TI_CT_KILL) { in iwl_tt_check_exit_ct_kill()
220 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_ready_for_ct_kill() local
226 if (tt->state != IWL_TI_CT_KILL) { in iwl_tt_ready_for_ct_kill()
229 tt->state = IWL_TI_CT_KILL; in iwl_tt_ready_for_ct_kill()
260 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_legacy_tt_handler() local
264 if ((tt->tt_previous_temp) && in iwl_legacy_tt_handler()
265 (temp > tt->tt_previous_temp) && in iwl_legacy_tt_handler()
266 ((temp - tt->tt_previous_temp) > in iwl_legacy_tt_handler()
270 (temp - tt->tt_previous_temp)); in iwl_legacy_tt_handler()
273 old_state = tt->state; in iwl_legacy_tt_handler()
276 tt->state = IWL_TI_CT_KILL; in iwl_legacy_tt_handler()
278 tt->state = IWL_TI_2; in iwl_legacy_tt_handler()
280 tt->state = IWL_TI_1; in iwl_legacy_tt_handler()
282 tt->state = IWL_TI_0; in iwl_legacy_tt_handler()
285 tt->tt_previous_temp = temp; in iwl_legacy_tt_handler()
289 if (tt->state != old_state) { in iwl_legacy_tt_handler()
290 switch (tt->state) { in iwl_legacy_tt_handler()
299 tt->tt_power_mode = IWL_POWER_INDEX_3; in iwl_legacy_tt_handler()
302 tt->tt_power_mode = IWL_POWER_INDEX_4; in iwl_legacy_tt_handler()
305 tt->tt_power_mode = IWL_POWER_INDEX_5; in iwl_legacy_tt_handler()
311 if (tt->state != IWL_TI_CT_KILL && in iwl_legacy_tt_handler()
318 tt->state = old_state; in iwl_legacy_tt_handler()
322 if (tt->state == IWL_TI_CT_KILL) { in iwl_legacy_tt_handler()
328 tt->state = old_state; in iwl_legacy_tt_handler()
331 tt->state != IWL_TI_CT_KILL) in iwl_legacy_tt_handler()
334 tt->state); in iwl_legacy_tt_handler()
336 tt->tt_power_mode); in iwl_legacy_tt_handler()
365 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_advance_tt_handler() local
371 old_state = tt->state; in iwl_advance_tt_handler()
383 transaction = tt->transaction + in iwl_advance_tt_handler()
388 if ((tt->tt_previous_temp) && in iwl_advance_tt_handler()
389 (temp > tt->tt_previous_temp) && in iwl_advance_tt_handler()
390 ((temp - tt->tt_previous_temp) > in iwl_advance_tt_handler()
395 (temp - tt->tt_previous_temp)); in iwl_advance_tt_handler()
397 tt->tt_previous_temp = temp; in iwl_advance_tt_handler()
402 tt->state = in iwl_advance_tt_handler()
411 if (tt->state >= IWL_TI_1) { in iwl_advance_tt_handler()
413 tt->tt_power_mode = IWL_POWER_INDEX_5; in iwl_advance_tt_handler()
451 if (tt->state != IWL_TI_CT_KILL && in iwl_advance_tt_handler()
460 tt->state = old_state; in iwl_advance_tt_handler()
464 tt->state); in iwl_advance_tt_handler()
466 tt->state == IWL_TI_CT_KILL) { in iwl_advance_tt_handler()
473 tt->state = old_state; in iwl_advance_tt_handler()
477 tt->state != IWL_TI_CT_KILL) { in iwl_advance_tt_handler()
499 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_bg_ct_enter() local
507 if (tt->state != IWL_TI_CT_KILL) { in iwl_bg_ct_enter()
528 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_bg_ct_exit() local
539 if (tt->state == IWL_TI_CT_KILL) { in iwl_bg_ct_exit()
606 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_initialize() local
612 memset(tt, 0, sizeof(struct iwl_tt_mgmt)); in iwl_tt_initialize()
614 tt->state = IWL_TI_0; in iwl_tt_initialize()
631 tt->restriction = kcalloc(IWL_TI_STATE_MAX, in iwl_tt_initialize()
634 tt->transaction = kcalloc(IWL_TI_STATE_MAX * in iwl_tt_initialize()
638 if (!tt->restriction || !tt->transaction) { in iwl_tt_initialize()
641 kfree(tt->restriction); in iwl_tt_initialize()
642 tt->restriction = NULL; in iwl_tt_initialize()
643 kfree(tt->transaction); in iwl_tt_initialize()
644 tt->transaction = NULL; in iwl_tt_initialize()
646 transaction = tt->transaction + in iwl_tt_initialize()
649 transaction = tt->transaction + in iwl_tt_initialize()
652 transaction = tt->transaction + in iwl_tt_initialize()
655 transaction = tt->transaction + in iwl_tt_initialize()
660 memcpy(tt->restriction, in iwl_tt_initialize()
673 struct iwl_tt_mgmt *tt = &priv->thermal_throttle; in iwl_tt_exit() local
685 kfree(tt->restriction); in iwl_tt_exit()
686 tt->restriction = NULL; in iwl_tt_exit()
687 kfree(tt->transaction); in iwl_tt_exit()
688 tt->transaction = NULL; in iwl_tt_exit()