From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
Tomas Winkler <tomas.winkler@intel.com>,
Zhu Yi <yi.zhu@intel.com>
Subject: [PATCH 08/13] iwlwifi: move iwl4965_set_pwr_src to iwl4965-base.c
Date: Fri, 18 Jul 2008 13:53:04 +0800 [thread overview]
Message-ID: <1216360389-5352-9-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1216360389-5352-8-git-send-email-yi.zhu@intel.com>
From: Tomas Winkler <tomas.winkler@intel.com>
This patch moves iwl4965_set_pwr_src to iwl4965-base.c.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-4965.c | 33 ---------------------------
drivers/net/wireless/iwlwifi/iwl4965-base.c | 31 +++++++++++++++++++++++++
2 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 32baeb2..1463421 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -341,39 +341,6 @@ err:
return -EINVAL;
}
-int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src)
-{
- int ret;
- unsigned long flags;
-
- spin_lock_irqsave(&priv->lock, flags);
- ret = iwl_grab_nic_access(priv);
- if (ret) {
- spin_unlock_irqrestore(&priv->lock, flags);
- return ret;
- }
-
- if (src == IWL_PWR_SRC_VAUX) {
- u32 val;
- ret = pci_read_config_dword(priv->pci_dev, PCI_POWER_SOURCE,
- &val);
-
- if (val & PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT) {
- iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
- APMG_PS_CTRL_VAL_PWR_SRC_VAUX,
- ~APMG_PS_CTRL_MSK_PWR_SRC);
- }
- } else {
- iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
- APMG_PS_CTRL_VAL_PWR_SRC_VMAIN,
- ~APMG_PS_CTRL_MSK_PWR_SRC);
- }
-
- iwl_release_nic_access(priv);
- spin_unlock_irqrestore(&priv->lock, flags);
-
- return ret;
-}
/*
* Activate/Deactivat Tx DMA/FIFO channels according tx fifos mask
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index e468936..2798ab7 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -1262,6 +1262,37 @@ static void iwl4965_rx_card_state_notif(struct iwl_priv *priv,
wake_up_interruptible(&priv->wait_command_queue);
}
+int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src)
+{
+ int ret;
+ unsigned long flags;
+
+ spin_lock_irqsave(&priv->lock, flags);
+ ret = iwl_grab_nic_access(priv);
+ if (ret)
+ goto err;
+
+ if (src == IWL_PWR_SRC_VAUX) {
+ u32 val;
+ ret = pci_read_config_dword(priv->pci_dev, PCI_POWER_SOURCE,
+ &val);
+
+ if (val & PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT)
+ iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
+ APMG_PS_CTRL_VAL_PWR_SRC_VAUX,
+ ~APMG_PS_CTRL_MSK_PWR_SRC);
+ } else {
+ iwl_set_bits_mask_prph(priv, APMG_PS_CTRL_REG,
+ APMG_PS_CTRL_VAL_PWR_SRC_VMAIN,
+ ~APMG_PS_CTRL_MSK_PWR_SRC);
+ }
+
+ iwl_release_nic_access(priv);
+err:
+ spin_unlock_irqrestore(&priv->lock, flags);
+ return ret;
+}
+
/**
* iwl4965_setup_rx_handlers - Initialize Rx handler callbacks
*
--
1.5.3.6
next prev parent reply other threads:[~2008-07-18 5:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 5:52 [PATCH 00/13] iwlwifi driver 07/18 updates Zhu Yi
2008-07-18 5:52 ` [PATCH 01/13] iwlwifi: add power save to 5000 HW Zhu Yi
2008-07-18 5:52 ` [PATCH 02/13] iwlwifi: corrects power_level in sysfs Zhu Yi
2008-07-18 5:52 ` [PATCH 03/13] mac80211: pass dtim_period to low level driver Zhu Yi
2008-07-18 5:53 ` [PATCH 04/13] mac80211: make listen_interval be limited by " Zhu Yi
2008-07-18 5:53 ` [PATCH 05/13] iwlwifi: use dtim_period from association, and set listen_interval Zhu Yi
2008-07-18 5:53 ` [PATCH 06/13] iwlwifi: move iwl4965_mac_ampdu_action to iwl4965-base.c Zhu Yi
2008-07-18 5:53 ` [PATCH 07/13] iwlwifi: move beacon handling " Zhu Yi
2008-07-18 5:53 ` Zhu Yi [this message]
2008-07-18 5:53 ` [PATCH 09/13] iwlwifi: rename iwl-4695-rs to iwl-agn-rs Zhu Yi
2008-07-18 5:53 ` [PATCH 10/13] iwlwifi: kill iwl4965_fill_rs_info Zhu Yi
2008-07-18 5:53 ` [PATCH 11/13] iwlwifi: set led register in disassociation Zhu Yi
2008-07-18 5:53 ` [PATCH 12/13] mac80211: remove unused variable agg_queue Zhu Yi
2008-07-18 5:53 ` [PATCH 13/13] iwlwifi: bug fix in AGG flow - cast const to ULL Zhu Yi
2008-07-18 8:23 ` [PATCH 05/13] iwlwifi: use dtim_period from association, and set listen_interval Johannes Berg
2008-07-18 8:53 ` Tomas Winkler
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=1216360389-5352-9-git-send-email-yi.zhu@intel.com \
--to=yi.zhu@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=tomas.winkler@intel.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