aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-12-05 15:51:20 -0500
committerBjorn Helgaas <bhelgaas@google.com>2012-12-07 13:19:52 -0500
commitf93eaffcacb43b5764fb440ef50bf88dc7a2eb3e (patch)
tree0d392c0379d188ce8d319cb04229b63b66de610e
parent94e1561344a7ef0e2aaed7c72050f8e4e82db1fe (diff)
iwlegacy: Use standard #defines for PCIe Capability ASPM fields
Use the standard #defines rather than creating local definitions for PCIe Capability ASPM fields. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
-rw-r--r--drivers/net/wireless/iwlegacy/4965.h4
-rw-r--r--drivers/net/wireless/iwlegacy/common.c5
-rw-r--r--drivers/net/wireless/iwlegacy/common.h4
3 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 2d092f328547..1b15b0b2292b 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -917,10 +917,6 @@ struct il4965_scd_bc_tbl {
917/* PCI registers */ 917/* PCI registers */
918#define PCI_CFG_RETRY_TIMEOUT 0x041 918#define PCI_CFG_RETRY_TIMEOUT 0x041
919 919
920/* PCI register values */
921#define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01
922#define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02
923
924#define IL4965_DEFAULT_TX_RETRY 15 920#define IL4965_DEFAULT_TX_RETRY 15
925 921
926/* EEPROM */ 922/* EEPROM */
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 181150760461..7e16d10a7f14 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -1186,7 +1186,7 @@ il_power_initialize(struct il_priv *il)
1186 u16 lctl; 1186 u16 lctl;
1187 1187
1188 pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl); 1188 pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl);
1189 il->power_data.pci_pm = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); 1189 il->power_data.pci_pm = !(lctl & PCI_EXP_LNKCTL_ASPM_L0S);
1190 1190
1191 il->power_data.debug_sleep_level_override = -1; 1191 il->power_data.debug_sleep_level_override = -1;
1192 1192
@@ -4235,8 +4235,7 @@ il_apm_init(struct il_priv *il)
4235 */ 4235 */
4236 if (il->cfg->set_l0s) { 4236 if (il->cfg->set_l0s) {
4237 pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl); 4237 pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl);
4238 if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == 4238 if (lctl & PCI_EXP_LNKCTL_ASPM_L1) {
4239 PCI_CFG_LINK_CTRL_VAL_L1_EN) {
4240 /* L1-ASPM enabled; disable(!) L0S */ 4239 /* L1-ASPM enabled; disable(!) L0S */
4241 il_set_bit(il, CSR_GIO_REG, 4240 il_set_bit(il, CSR_GIO_REG,
4242 CSR_GIO_REG_VAL_L0S_ENABLED); 4241 CSR_GIO_REG_VAL_L0S_ENABLED);
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index c9a5022aaa36..e181f3b573d9 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -2426,10 +2426,6 @@ struct il_tfd {
2426/* PCI registers */ 2426/* PCI registers */
2427#define PCI_CFG_RETRY_TIMEOUT 0x041 2427#define PCI_CFG_RETRY_TIMEOUT 0x041
2428 2428
2429/* PCI register values */
2430#define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01
2431#define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02
2432
2433struct il_rate_info { 2429struct il_rate_info {
2434 u8 plcp; /* uCode API: RATE_6M_PLCP, etc. */ 2430 u8 plcp; /* uCode API: RATE_6M_PLCP, etc. */
2435 u8 plcp_siso; /* uCode API: RATE_SISO_6M_PLCP, etc. */ 2431 u8 plcp_siso; /* uCode API: RATE_SISO_6M_PLCP, etc. */