Signed-off-by: Zhu Yi <yi.zhu@xxxxxxxxx> --- drivers/net/wireless/iwl-3945.c | 3 ++- drivers/net/wireless/iwl-4965.c | 8 +++++--- drivers/net/wireless/iwl-hw.h | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/iwl-3945.c b/drivers/net/wireless/iwl-3945.c index 8e78ad5..50c21aa 100644 --- a/drivers/net/wireless/iwl-3945.c +++ b/drivers/net/wireless/iwl-3945.c @@ -721,7 +721,8 @@ static int iwl3945_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max) if (!pwr_max) { u32 val; - rc = pci_read_config_dword(priv->pci_dev, 0x0C8, &val); + rc = pci_read_config_dword(priv->pci_dev, PCI_POWER_SOURCE, + &val); if (val & PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT) { iwl_set_bits_mask_restricted_reg( priv, ALM_APMG_PS_CTL, diff --git a/drivers/net/wireless/iwl-4965.c b/drivers/net/wireless/iwl-4965.c index 8175b48..d334951 100644 --- a/drivers/net/wireless/iwl-4965.c +++ b/drivers/net/wireless/iwl-4965.c @@ -203,7 +203,8 @@ static int iwl4965_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max) if (!pwr_max) { u32 val; - rc = pci_read_config_dword(priv->pci_dev, 0x0C8, &val); + rc = pci_read_config_dword(priv->pci_dev, PCI_POWER_SOURCE, + &val); if (val & PCI_CFG_PMC_PME_FROM_D3COLD_SUPPORT) iwl_set_bits_mask_restricted_reg( @@ -476,9 +477,10 @@ int iwl_hw_nic_init(struct iwl_priv *priv) spin_lock_irqsave(&priv->lock, flags); if ((rev_id & 0x80) == 0x80 && (rev_id & 0x7f) < 8) { - pci_read_config_dword(priv->pci_dev, 0xe8, &val); + pci_read_config_dword(priv->pci_dev, PCI_REG_WUM8, &val); /* Enable No Snoop field */ - pci_write_config_dword(priv->pci_dev, 0xe8, val & ~(1 << 11)); + pci_write_config_dword(priv->pci_dev, PCI_REG_WUM8, + val & ~(1 << 11)); } spin_unlock_irqrestore(&priv->lock, flags); diff --git a/drivers/net/wireless/iwl-hw.h b/drivers/net/wireless/iwl-hw.h index e01f29c..f371794 100644 --- a/drivers/net/wireless/iwl-hw.h +++ b/drivers/net/wireless/iwl-hw.h @@ -179,6 +179,8 @@ struct iwl_error_resp { } __attribute__ ((packed)); #define PCI_LINK_CTRL 0x0F0 +#define PCI_POWER_SOURCE 0x0C8 +#define PCI_REG_WUM8 0x0E8 /* * Rx config defines & structure -- 1.5.2 - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html