aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-09-02 23:26:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-08 14:23:19 -0400
commite7b635814b640c6fd9dca1c254dc22fac6fb9a1a (patch)
treeff09a16f4a704b81dedde80a68728ddc4e423505 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent926f0b2ef24041db876ec7213fbddd7cd4555951 (diff)
iwlwifi: cleanup PCI register handling
This patch cleans up pci registers handling. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index ffaf3f2e8a9e..250473138f30 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1273,7 +1273,7 @@ int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src)
1273 1273
1274 if (src == IWL_PWR_SRC_VAUX) { 1274 if (src == IWL_PWR_SRC_VAUX) {
1275 u32 val; 1275 u32 val;
1276 ret = pci_read_config_dword(priv->pci_dev, PCI_POWER_SOURCE, 1276 ret = pci_read_config_dword(priv->pci_dev, PCI_CFG_POWER_SOURCE,
1277 &val); 1277 &val);
1278 1278
1279 if (val & PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT) 1279 if (val & PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT)
@@ -4229,9 +4229,6 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4229 4229
4230 pci_set_drvdata(pdev, priv); 4230 pci_set_drvdata(pdev, priv);
4231 4231
4232 /* We disable the RETRY_TIMEOUT register (0x41) to keep
4233 * PCI Tx retries from interfering with C3 CPU state */
4234 pci_write_config_byte(pdev, 0x41, 0x00);
4235 4232
4236 /*********************** 4233 /***********************
4237 * 3. Read REV register 4234 * 3. Read REV register
@@ -4251,6 +4248,10 @@ static int iwl4965_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
4251 ": Detected Intel Wireless WiFi Link %s REV=0x%X\n", 4248 ": Detected Intel Wireless WiFi Link %s REV=0x%X\n",
4252 priv->cfg->name, priv->hw_rev); 4249 priv->cfg->name, priv->hw_rev);
4253 4250
4251 /* We disable the RETRY_TIMEOUT register (0x41) to keep
4252 * PCI Tx retries from interfering with C3 CPU state */
4253 pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00);
4254
4254 /* amp init */ 4255 /* amp init */
4255 err = priv->cfg->ops->lib->apm_ops.init(priv); 4256 err = priv->cfg->ops->lib->apm_ops.init(priv);
4256 if (err < 0) { 4257 if (err < 0) {