提交 3a780d25 编写于 作者: W Wey-Yi Guy 提交者: John W. Linville

iwlwifi: handle the case when set power fail

Modify the power update function, when driver fail to set the power, it
should not continue move forward and try to change the rx chain
configuration.
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 ee9f2989
...@@ -282,18 +282,21 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) ...@@ -282,18 +282,21 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
cmd.flags |= IWL_POWER_FAST_PD; cmd.flags |= IWL_POWER_FAST_PD;
ret = iwl_set_power(priv, &cmd); ret = iwl_set_power(priv, &cmd);
if (!ret) {
if (final_mode == IWL_POWER_MODE_CAM) if (final_mode == IWL_POWER_MODE_CAM)
clear_bit(STATUS_POWER_PMI, &priv->status); clear_bit(STATUS_POWER_PMI, &priv->status);
if (priv->cfg->ops->lib->update_chain_flags && update_chains) if (priv->cfg->ops->lib->update_chain_flags &&
update_chains)
priv->cfg->ops->lib->update_chain_flags(priv); priv->cfg->ops->lib->update_chain_flags(priv);
else else
IWL_DEBUG_POWER(priv, "Cannot update the power, chain noise " IWL_DEBUG_POWER(priv,
"Cannot update the power, chain noise "
"calibration running: %d\n", "calibration running: %d\n",
priv->chain_noise_data.state); priv->chain_noise_data.state);
if (!ret)
setting->power_mode = final_mode; setting->power_mode = final_mode;
} else
IWL_ERR(priv, "set power fail, ret = %d", ret);
} }
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册