diff options
author | Don Fry <donald.h.fry@intel.com> | 2012-03-07 12:52:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-08 13:59:53 -0500 |
commit | 9a716863ae4a2f039bc4d0b2b2bb4b24a1dc7a91 (patch) | |
tree | c726ed36709f66286ec0a068276111873a9f62eb /drivers/net/wireless/iwlwifi/iwl-agn-tt.c | |
parent | 18c57d3c1e31a91a5925da001c19d521178d00bd (diff) |
iwlwifi: separate status to priv and trans
The shared status bits are a mixture of transport and op mode bits.
Some are used just by one or the other, some are shared. Begin the
de-tangling of these bits.
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tt.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tt.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c index 9a12b70c7d4f..fa9415309cd6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c | |||
@@ -233,7 +233,7 @@ static void iwl_tt_ready_for_ct_kill(unsigned long data) | |||
233 | IWL_DEBUG_TEMP(priv, "entering CT_KILL state when " | 233 | IWL_DEBUG_TEMP(priv, "entering CT_KILL state when " |
234 | "temperature timer expired\n"); | 234 | "temperature timer expired\n"); |
235 | tt->state = IWL_TI_CT_KILL; | 235 | tt->state = IWL_TI_CT_KILL; |
236 | set_bit(STATUS_CT_KILL, &priv->shrd->status); | 236 | set_bit(STATUS_CT_KILL, &priv->status); |
237 | iwl_perform_ct_kill_task(priv, true); | 237 | iwl_perform_ct_kill_task(priv, true); |
238 | } | 238 | } |
239 | } | 239 | } |
@@ -313,22 +313,21 @@ static void iwl_legacy_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
313 | } | 313 | } |
314 | mutex_lock(&priv->mutex); | 314 | mutex_lock(&priv->mutex); |
315 | if (old_state == IWL_TI_CT_KILL) | 315 | if (old_state == IWL_TI_CT_KILL) |
316 | clear_bit(STATUS_CT_KILL, &priv->shrd->status); | 316 | clear_bit(STATUS_CT_KILL, &priv->status); |
317 | if (tt->state != IWL_TI_CT_KILL && | 317 | if (tt->state != IWL_TI_CT_KILL && |
318 | iwl_power_update_mode(priv, true)) { | 318 | iwl_power_update_mode(priv, true)) { |
319 | /* TT state not updated | 319 | /* TT state not updated |
320 | * try again during next temperature read | 320 | * try again during next temperature read |
321 | */ | 321 | */ |
322 | if (old_state == IWL_TI_CT_KILL) | 322 | if (old_state == IWL_TI_CT_KILL) |
323 | set_bit(STATUS_CT_KILL, &priv->shrd->status); | 323 | set_bit(STATUS_CT_KILL, &priv->status); |
324 | tt->state = old_state; | 324 | tt->state = old_state; |
325 | IWL_ERR(priv, "Cannot update power mode, " | 325 | IWL_ERR(priv, "Cannot update power mode, " |
326 | "TT state not updated\n"); | 326 | "TT state not updated\n"); |
327 | } else { | 327 | } else { |
328 | if (tt->state == IWL_TI_CT_KILL) { | 328 | if (tt->state == IWL_TI_CT_KILL) { |
329 | if (force) { | 329 | if (force) { |
330 | set_bit(STATUS_CT_KILL, | 330 | set_bit(STATUS_CT_KILL, &priv->status); |
331 | &priv->shrd->status); | ||
332 | iwl_perform_ct_kill_task(priv, true); | 331 | iwl_perform_ct_kill_task(priv, true); |
333 | } else { | 332 | } else { |
334 | iwl_prepare_ct_kill_task(priv); | 333 | iwl_prepare_ct_kill_task(priv); |
@@ -454,7 +453,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
454 | } | 453 | } |
455 | mutex_lock(&priv->mutex); | 454 | mutex_lock(&priv->mutex); |
456 | if (old_state == IWL_TI_CT_KILL) | 455 | if (old_state == IWL_TI_CT_KILL) |
457 | clear_bit(STATUS_CT_KILL, &priv->shrd->status); | 456 | clear_bit(STATUS_CT_KILL, &priv->status); |
458 | if (tt->state != IWL_TI_CT_KILL && | 457 | if (tt->state != IWL_TI_CT_KILL && |
459 | iwl_power_update_mode(priv, true)) { | 458 | iwl_power_update_mode(priv, true)) { |
460 | /* TT state not updated | 459 | /* TT state not updated |
@@ -463,7 +462,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
463 | IWL_ERR(priv, "Cannot update power mode, " | 462 | IWL_ERR(priv, "Cannot update power mode, " |
464 | "TT state not updated\n"); | 463 | "TT state not updated\n"); |
465 | if (old_state == IWL_TI_CT_KILL) | 464 | if (old_state == IWL_TI_CT_KILL) |
466 | set_bit(STATUS_CT_KILL, &priv->shrd->status); | 465 | set_bit(STATUS_CT_KILL, &priv->status); |
467 | tt->state = old_state; | 466 | tt->state = old_state; |
468 | } else { | 467 | } else { |
469 | IWL_DEBUG_TEMP(priv, | 468 | IWL_DEBUG_TEMP(priv, |
@@ -474,8 +473,7 @@ static void iwl_advance_tt_handler(struct iwl_priv *priv, s32 temp, bool force) | |||
474 | if (force) { | 473 | if (force) { |
475 | IWL_DEBUG_TEMP(priv, | 474 | IWL_DEBUG_TEMP(priv, |
476 | "Enter IWL_TI_CT_KILL\n"); | 475 | "Enter IWL_TI_CT_KILL\n"); |
477 | set_bit(STATUS_CT_KILL, | 476 | set_bit(STATUS_CT_KILL, &priv->status); |
478 | &priv->shrd->status); | ||
479 | iwl_perform_ct_kill_task(priv, true); | 477 | iwl_perform_ct_kill_task(priv, true); |
480 | } else { | 478 | } else { |
481 | iwl_prepare_ct_kill_task(priv); | 479 | iwl_prepare_ct_kill_task(priv); |