From: Mohamed Abbas Date: Wed, 18 Mar 2009 04:51:45 +0000 (-0700) Subject: iwlcore: dont commit power command if interface is not up X-Git-Tag: v3.0~9763^2~83^2~67 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28c608750f5f72e3c4139f7a51358eccd58c80a9;p=platform%2Fkernel%2Flinux-amlogic.git iwlcore: dont commit power command if interface is not up If user set new power level, accept the new power level and only send command to host if the interface is up and radio on. Signed-off-by: Mohamed Abbas Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 18b7e41..47c8945 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c @@ -273,7 +273,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) if (priv->iw_mode != NL80211_IFTYPE_STATION) final_mode = IWL_POWER_MODE_CAM; - if (!iwl_is_rfkill(priv) && !setting->power_disabled && + if (iwl_is_ready_rf(priv) && !setting->power_disabled && ((setting->power_mode != final_mode) || force)) { struct iwl_powertable_cmd cmd;