diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-power.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index bd97a0da1cd5..9e8916d15ecf 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -282,18 +282,21 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) | |||
282 | cmd.flags |= IWL_POWER_FAST_PD; | 282 | cmd.flags |= IWL_POWER_FAST_PD; |
283 | 283 | ||
284 | ret = iwl_set_power(priv, &cmd); | 284 | ret = iwl_set_power(priv, &cmd); |
285 | 285 | if (!ret) { | |
286 | if (final_mode == IWL_POWER_MODE_CAM) | 286 | if (final_mode == IWL_POWER_MODE_CAM) |
287 | clear_bit(STATUS_POWER_PMI, &priv->status); | 287 | clear_bit(STATUS_POWER_PMI, &priv->status); |
288 | 288 | ||
289 | if (priv->cfg->ops->lib->update_chain_flags && update_chains) | 289 | if (priv->cfg->ops->lib->update_chain_flags && |
290 | priv->cfg->ops->lib->update_chain_flags(priv); | 290 | update_chains) |
291 | else | 291 | priv->cfg->ops->lib->update_chain_flags(priv); |
292 | IWL_DEBUG_POWER(priv, "Cannot update the power, chain noise " | 292 | else |
293 | IWL_DEBUG_POWER(priv, | ||
294 | "Cannot update the power, chain noise " | ||
293 | "calibration running: %d\n", | 295 | "calibration running: %d\n", |
294 | priv->chain_noise_data.state); | 296 | priv->chain_noise_data.state); |
295 | if (!ret) | ||
296 | setting->power_mode = final_mode; | 297 | setting->power_mode = final_mode; |
298 | } else | ||
299 | IWL_ERR(priv, "set power fail, ret = %d", ret); | ||
297 | } | 300 | } |
298 | 301 | ||
299 | return ret; | 302 | return ret; |