iwlagn: temperature should be measure for all _agn devices
[linux-2.6.git] / drivers / net / wireless / iwlwifi / iwl-power.c
index b7cd958..595c930 100644 (file)
@@ -357,12 +357,10 @@ static void iwl_power_build_cmd(struct iwl_priv *priv,
 
        if (priv->hw->conf.flags & IEEE80211_CONF_IDLE)
                iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20);
-       else if (priv->cfg->ops->lib->tt_ops.lower_power_detection &&
-                priv->cfg->ops->lib->tt_ops.tt_power_mode &&
-                priv->cfg->ops->lib->tt_ops.lower_power_detection(priv)) {
+       else if (iwl_tt_is_low_power_state(priv)) {
                /* in thermal throttling low power state */
                iwl_static_sleep_cmd(priv, cmd,
-                   priv->cfg->ops->lib->tt_ops.tt_power_mode(priv), dtimper);
+                   iwl_tt_current_power_mode(priv), dtimper);
        } else if (!enabled)
                iwl_power_sleep_cam_cmd(priv, cmd);
        else if (priv->power_data.debug_sleep_level_override >= 0)