aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tt.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tt.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
index 348f74f1c8e8..f501d742984c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c
@@ -198,7 +198,7 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data)
198 /* Reschedule the ct_kill timer to occur in 198 /* Reschedule the ct_kill timer to occur in
199 * CT_KILL_EXIT_DURATION seconds to ensure we get a 199 * CT_KILL_EXIT_DURATION seconds to ensure we get a
200 * thermal update */ 200 * thermal update */
201 IWL_DEBUG_POWER(priv, "schedule ct_kill exit timer\n"); 201 IWL_DEBUG_TEMP(priv, "schedule ct_kill exit timer\n");
202 mod_timer(&priv->thermal_throttle.ct_kill_exit_tm, 202 mod_timer(&priv->thermal_throttle.ct_kill_exit_tm,
203 jiffies + CT_KILL_EXIT_DURATION * HZ); 203 jiffies + CT_KILL_EXIT_DURATION * HZ);
204 } 204 }
@@ -208,15 +208,15 @@ static void iwl_perform_ct_kill_task(struct iwl_priv *priv,
208 bool stop) 208 bool stop)
209{ 209{
210 if (stop) { 210 if (stop) {
211 IWL_DEBUG_POWER(priv, "Stop all queues\n"); 211 IWL_DEBUG_TEMP(priv, "Stop all queues\n");
212 if (priv->mac80211_registered) 212 if (priv->mac80211_registered)
213 ieee80211_stop_queues(priv->hw); 213 ieee80211_stop_queues(priv->hw);
214 IWL_DEBUG_POWER(priv, 214 IWL_DEBUG_TEMP(priv,
215 "Schedule 5 seconds CT_KILL Timer\n"); 215 "Schedule 5 seconds CT_KILL Timer\n");
216 mod_timer(&priv->thermal_throttle.ct_kill_exit_tm, 216 mod_timer(&priv->thermal_throttle.ct_kill_exit_tm,
217 jiffies + CT_KILL_EXIT_DURATION * HZ); 217 jiffies + CT_KILL_EXIT_DURATION * HZ);
218 } else { 218 } else {
219 IWL_DEBUG_POWER(priv, "Wake all queues\n"); 219 IWL_DEBUG_TEMP(priv, "Wake all queues\n");
220 if (priv->mac80211_registered) 220 if (priv->mac80211_registered)
221 ieee80211_wake_queues(priv->hw); 221 ieee80211_wake_queues(priv->hw);
222 } 222 }
@@ -232,7 +232,7 @@ static void iwl_tt_ready_for_ct_kill(unsigned long data)
232 232
233 /* temperature timer expired, ready to go into CT_KILL state */ 233 /* temperature timer expired, ready to go into CT_KILL state */
234 if (tt->state != IWL_TI_CT_KILL) { 234 if (tt->state != IWL_TI_CT_KILL) {
235 IWL_DEBUG_POWER(priv, "entering CT_KILL state when " 235 IWL_DEBUG_TEMP(priv, "entering CT_KILL state when "
236 "temperature timer expired\n"); 236 "temperature timer expired\n");
237 tt->state = IWL_TI_CT_KILL; 237 tt->state = IWL_TI_CT_KILL;
238 set_bit(STATUS_CT_KILL, &priv->status); 238 set_bit(STATUS_CT_KILL, &priv->status);
@@ -242,7 +242,7 @@ static void iwl_tt_ready_for_ct_kill(unsigned long data)
242 242
243static void iwl_prepare_ct_kill_task(struct iwl_priv *priv) 243static void iwl_prepare_ct_kill_task(struct iwl_priv *priv)
244{ 244{
245 IWL_DEBUG_POWER(priv, "Prepare to enter IWL_TI_CT_KILL\n"); 245 IWL_DEBUG_TEMP(priv, "Prepare to enter IWL_TI_CT_KILL\n");
246 /* make request to retrieve statistics information */ 246 /* make request to retrieve statistics information */
247 iwl_send_statistics_request(priv, CMD_SYNC, false); 247 iwl_send_statistics_request(priv, CMD_SYNC, false);
248 /* Reschedule the ct_kill wait timer */ 248 /* Reschedule the ct_kill wait timer */
@@ -273,7 +273,7 @@ static void iwl_legacy_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
273 (temp > tt->tt_previous_temp) && 273 (temp > tt->tt_previous_temp) &&
274 ((temp - tt->tt_previous_temp) > 274 ((temp - tt->tt_previous_temp) >
275 IWL_TT_INCREASE_MARGIN)) { 275 IWL_TT_INCREASE_MARGIN)) {
276 IWL_DEBUG_POWER(priv, 276 IWL_DEBUG_TEMP(priv,
277 "Temperature increase %d degree Celsius\n", 277 "Temperature increase %d degree Celsius\n",
278 (temp - tt->tt_previous_temp)); 278 (temp - tt->tt_previous_temp));
279 } 279 }
@@ -338,9 +338,9 @@ static void iwl_legacy_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
338 } else if (old_state == IWL_TI_CT_KILL && 338 } else if (old_state == IWL_TI_CT_KILL &&
339 tt->state != IWL_TI_CT_KILL) 339 tt->state != IWL_TI_CT_KILL)
340 iwl_perform_ct_kill_task(priv, false); 340 iwl_perform_ct_kill_task(priv, false);
341 IWL_DEBUG_POWER(priv, "Temperature state changed %u\n", 341 IWL_DEBUG_TEMP(priv, "Temperature state changed %u\n",
342 tt->state); 342 tt->state);
343 IWL_DEBUG_POWER(priv, "Power Index change to %u\n", 343 IWL_DEBUG_TEMP(priv, "Power Index change to %u\n",
344 tt->tt_power_mode); 344 tt->tt_power_mode);
345 } 345 }
346 mutex_unlock(&priv->mutex); 346 mutex_unlock(&priv->mutex);
@@ -397,7 +397,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
397 (temp > tt->tt_previous_temp) && 397 (temp > tt->tt_previous_temp) &&
398 ((temp - tt->tt_previous_temp) > 398 ((temp - tt->tt_previous_temp) >
399 IWL_TT_INCREASE_MARGIN)) { 399 IWL_TT_INCREASE_MARGIN)) {
400 IWL_DEBUG_POWER(priv, 400 IWL_DEBUG_TEMP(priv,
401 "Temperature increase %d " 401 "Temperature increase %d "
402 "degree Celsius\n", 402 "degree Celsius\n",
403 (temp - tt->tt_previous_temp)); 403 (temp - tt->tt_previous_temp));
@@ -467,13 +467,13 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
467 set_bit(STATUS_CT_KILL, &priv->status); 467 set_bit(STATUS_CT_KILL, &priv->status);
468 tt->state = old_state; 468 tt->state = old_state;
469 } else { 469 } else {
470 IWL_DEBUG_POWER(priv, 470 IWL_DEBUG_TEMP(priv,
471 "Thermal Throttling to new state: %u\n", 471 "Thermal Throttling to new state: %u\n",
472 tt->state); 472 tt->state);
473 if (old_state != IWL_TI_CT_KILL && 473 if (old_state != IWL_TI_CT_KILL &&
474 tt->state == IWL_TI_CT_KILL) { 474 tt->state == IWL_TI_CT_KILL) {
475 if (force) { 475 if (force) {
476 IWL_DEBUG_POWER(priv, 476 IWL_DEBUG_TEMP(priv,
477 "Enter IWL_TI_CT_KILL\n"); 477 "Enter IWL_TI_CT_KILL\n");
478 set_bit(STATUS_CT_KILL, &priv->status); 478 set_bit(STATUS_CT_KILL, &priv->status);
479 iwl_perform_ct_kill_task(priv, true); 479 iwl_perform_ct_kill_task(priv, true);
@@ -483,7 +483,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force)
483 } 483 }
484 } else if (old_state == IWL_TI_CT_KILL && 484 } else if (old_state == IWL_TI_CT_KILL &&
485 tt->state != IWL_TI_CT_KILL) { 485 tt->state != IWL_TI_CT_KILL) {
486 IWL_DEBUG_POWER(priv, "Exit IWL_TI_CT_KILL\n"); 486 IWL_DEBUG_TEMP(priv, "Exit IWL_TI_CT_KILL\n");
487 iwl_perform_ct_kill_task(priv, false); 487 iwl_perform_ct_kill_task(priv, false);
488 } 488 }
489 } 489 }
@@ -568,7 +568,7 @@ void iwl_tt_enter_ct_kill(struct iwl_priv *priv)
568 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 568 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
569 return; 569 return;
570 570
571 IWL_DEBUG_POWER(priv, "Queueing critical temperature enter.\n"); 571 IWL_DEBUG_TEMP(priv, "Queueing critical temperature enter.\n");
572 queue_work(priv->workqueue, &priv->ct_enter); 572 queue_work(priv->workqueue, &priv->ct_enter);
573} 573}
574 574
@@ -577,7 +577,7 @@ void iwl_tt_exit_ct_kill(struct iwl_priv *priv)
577 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 577 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
578 return; 578 return;
579 579
580 IWL_DEBUG_POWER(priv, "Queueing critical temperature exit.\n"); 580 IWL_DEBUG_TEMP(priv, "Queueing critical temperature exit.\n");
581 queue_work(priv->workqueue, &priv->ct_exit); 581 queue_work(priv->workqueue, &priv->ct_exit);
582} 582}
583 583
@@ -603,7 +603,7 @@ void iwl_tt_handler(struct iwl_priv *priv)
603 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 603 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
604 return; 604 return;
605 605
606 IWL_DEBUG_POWER(priv, "Queueing thermal throttling work.\n"); 606 IWL_DEBUG_TEMP(priv, "Queueing thermal throttling work.\n");
607 queue_work(priv->workqueue, &priv->tt_work); 607 queue_work(priv->workqueue, &priv->tt_work);
608} 608}
609 609
@@ -618,7 +618,7 @@ void iwl_tt_initialize(struct iwl_priv *priv)
618 int size = sizeof(struct iwl_tt_trans) * (IWL_TI_STATE_MAX - 1); 618 int size = sizeof(struct iwl_tt_trans) * (IWL_TI_STATE_MAX - 1);
619 struct iwl_tt_trans *transaction; 619 struct iwl_tt_trans *transaction;
620 620
621 IWL_DEBUG_POWER(priv, "Initialize Thermal Throttling\n"); 621 IWL_DEBUG_TEMP(priv, "Initialize Thermal Throttling\n");
622 622
623 memset(tt, 0, sizeof(struct iwl_tt_mgmt)); 623 memset(tt, 0, sizeof(struct iwl_tt_mgmt));
624 624
@@ -638,7 +638,7 @@ void iwl_tt_initialize(struct iwl_priv *priv)
638 INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit); 638 INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit);
639 639
640 if (priv->cfg->base_params->adv_thermal_throttle) { 640 if (priv->cfg->base_params->adv_thermal_throttle) {
641 IWL_DEBUG_POWER(priv, "Advanced Thermal Throttling\n"); 641 IWL_DEBUG_TEMP(priv, "Advanced Thermal Throttling\n");
642 tt->restriction = kzalloc(sizeof(struct iwl_tt_restriction) * 642 tt->restriction = kzalloc(sizeof(struct iwl_tt_restriction) *
643 IWL_TI_STATE_MAX, GFP_KERNEL); 643 IWL_TI_STATE_MAX, GFP_KERNEL);
644 tt->transaction = kzalloc(sizeof(struct iwl_tt_trans) * 644 tt->transaction = kzalloc(sizeof(struct iwl_tt_trans) *
@@ -671,7 +671,7 @@ void iwl_tt_initialize(struct iwl_priv *priv)
671 priv->thermal_throttle.advanced_tt = true; 671 priv->thermal_throttle.advanced_tt = true;
672 } 672 }
673 } else { 673 } else {
674 IWL_DEBUG_POWER(priv, "Legacy Thermal Throttling\n"); 674 IWL_DEBUG_TEMP(priv, "Legacy Thermal Throttling\n");
675 priv->thermal_throttle.advanced_tt = false; 675 priv->thermal_throttle.advanced_tt = false;
676 } 676 }
677} 677}