iwlcore: dont commit power command if interface is not up
authorMohamed Abbas <mohamed.abbas@intel.com>
Wed, 18 Mar 2009 04:51:45 +0000 (21:51 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 28 Mar 2009 00:12:58 +0000 (20:12 -0400)
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 <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-power.c

index 18b7e4195ea1c77de594b4528eac72159088001c..47c894530eb583e978e17c2f1002a0871620def2 100644 (file)
@@ -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;