From: "Guy, Wey-Yi" <wey-yi.w.guy@intel.com>
To: "linville@tuxdriver.com" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"ipw3945-devel@lists.sourceforge.net"
<ipw3945-devel@lists.sourceforge.net>
Subject: Re: [PATCH 3/8] iwlwifi: separate thermal throttling function
Date: Fri, 06 Aug 2010 14:56:28 -0700 [thread overview]
Message-ID: <1281131788.26320.5.camel@wwguy-ubuntu> (raw)
In-Reply-To: <1281100480.3853.424.camel@jlt3.sipsolutions.net>
[-- Attachment #1: Type: text/plain, Size: 1618 bytes --]
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
>
[-- Attachment #2: 0001-iwlwifi-fix-thermal-throttling-related-power-manage.patch --]
[-- Type: text/x-patch, Size: 1783 bytes --]
>From 98ec32fb40c92ce0175a3246660f4ae7969308d7 Mon Sep 17 00:00:00 2001
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date: Fri, 6 Aug 2010 12:39:14 -0700
Subject: [PATCH 1/1] iwlwifi: fix thermal throttling related power manageent operation
The current approach is very broken because it adds an
often-used code path that will not initialise "cmd" at all.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Shanyu Zhao <shanyu.zhao.intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-power.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index da1f2ae..63c0ab4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -284,13 +284,11 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
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) {
- 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);
- }
+ priv->cfg->ops->lib->tt_ops.tt_power_mode &&
+ 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)
--
1.5.6.3
next prev parent reply other threads:[~2010-08-06 21:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-31 15:34 [PATCH 0/8] iwlwifi update for 2.6.36 Wey-Yi Guy
2010-07-31 15:34 ` [PATCH 1/8] iwlwifi: make iwl_hw_detect static to _agn Wey-Yi Guy
2010-07-31 15:34 ` [PATCH 2/8] iwlagn: log pci revision id Wey-Yi Guy
2010-07-31 15:34 ` [PATCH 3/8] iwlwifi: separate thermal throttling function Wey-Yi Guy
2010-08-06 13:14 ` Johannes Berg
2010-08-06 14:51 ` Guy, Wey-Yi
2010-08-06 18:59 ` Patches not make into wireless-next Guy, Wey-Yi
2010-08-06 19:17 ` John W. Linville
2010-08-06 21:56 ` Guy, Wey-Yi [this message]
2010-07-31 15:34 ` [PATCH 4/8] iwlwifi: make iwl_set_hw_params static to _agn Wey-Yi Guy
2010-07-31 15:34 ` [PATCH 5/8] iwlwifi: fix compile warning Wey-Yi Guy
2010-07-31 15:34 ` [PATCH 6/8] iwlwifi: track IBSS manager status Wey-Yi Guy
2010-07-31 15:34 ` [PATCH 7/8] iwlwifi: BA scd_flow not match condition detected Wey-Yi Guy
2010-07-31 15:34 ` [PATCH 8/8] iwlagn: fix typo in ucode_bt_stats_read debugfs Wey-Yi Guy
2010-08-04 19:03 ` [PATCH 0/8] iwlwifi update for 2.6.36 John W. Linville
2010-08-04 19:17 ` Guy, Wey-Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281131788.26320.5.camel@wwguy-ubuntu \
--to=wey-yi.w.guy@intel.com \
--cc=ipw3945-devel@lists.sourceforge.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).