Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122011
b: refs/heads/master
c: a71c8f6
h: refs/heads/master
i:
  122009: 402fb22
  122007: 32e98e8
v: v3
  • Loading branch information
Winkler, Tomas authored and John W. Linville committed Nov 21, 2008
1 parent df1bb19 commit bf4e70b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 193357748979985498f21abc94c7a0a3ed5a3b8e
refs/heads/master: a71c8f62d46e4496011182658dc058303960c068
17 changes: 8 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-power.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,11 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
struct iwl_power_mgr *setting = &(priv->power_data);
int ret = 0;
u16 uninitialized_var(final_mode);
bool update_chains;

/* Don't update the RX chain when chain noise calibration is running */
if (priv->chain_noise_data.state != IWL_CHAIN_NOISE_DONE &&
priv->chain_noise_data.state != IWL_CHAIN_NOISE_ALIVE) {
IWL_DEBUG_POWER("Cannot update the power, chain noise "
"calibration running: %d\n",
priv->chain_noise_data.state);
return -EAGAIN;
}
update_chains = priv->chain_noise_data.state == IWL_CHAIN_NOISE_DONE ||
priv->chain_noise_data.state == IWL_CHAIN_NOISE_ALIVE;

/* If on battery, set to 3,
* if plugged into AC power, set to CAM ("continuously aware mode"),
Expand Down Expand Up @@ -313,9 +309,12 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
else
set_bit(STATUS_POWER_PMI, &priv->status);

if (priv->cfg->ops->lib->update_chain_flags)
if (priv->cfg->ops->lib->update_chain_flags && update_chains)
priv->cfg->ops->lib->update_chain_flags(priv);

else
IWL_DEBUG_POWER("Cannot update the power, chain noise "
"calibration running: %d\n",
priv->chain_noise_data.state);
if (!ret)
setting->power_mode = final_mode;
}
Expand Down

0 comments on commit bf4e70b

Please sign in to comment.