Hi John, Based on ours previous conversation, I understand the thermal throttling patch is not being merge it, since it has a stupid bug I create and being identify by Johannes, is it ok for you to merge the attached patch with the original patch work while you ready to push? Thanks On Fri, 2010-08-06 at 06:14 -0700, Johannes Berg wrote: > > @@ -325,9 +283,15 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) > > else if (priv->cfg->supports_idle && > > priv->hw->conf.flags & IEEE80211_CONF_IDLE) > > iwl_static_sleep_cmd(priv, &cmd, IWL_POWER_INDEX_5, 20); > > - else if (tt->state >= IWL_TI_1) > > - iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper); > > - else if (!enabled) > > + else if (priv->cfg->ops->lib->tt_ops.lower_power_detection && > > + priv->cfg->ops->lib->tt_ops.tt_power_mode) { > > + if (priv->cfg->ops->lib->tt_ops.lower_power_detection(priv)) { > > + /* in thermal throttling low power state */ > > + iwl_static_sleep_cmd(priv, &cmd, > > + priv->cfg->ops->lib->tt_ops.tt_power_mode(priv), > > + dtimper); > > + } > > + } else if (!enabled) > > iwl_power_sleep_cam_cmd(priv, &cmd); > > else if (priv->power_data.debug_sleep_level_override >= 0) > > iwl_static_sleep_cmd(priv, &cmd, > > This is very very broken because it adds an often-used code path that > will not initialise "cmd" at all. It needs to be > > ... > else if (priv->...lower_power_detection && > priv->...tt_power_mode && > priv->...lower_power_detection(priv)) > iwl_static_sleep_cmd(...) > else if (!enabled) > ... > > johannes >