iwlwifi: 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: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
b9d146e30a
commit
438a0f0a1f
|
@ -670,8 +670,6 @@ static void iwl_set_pwr_vmain(struct iwl_trans *trans)
|
|||
|
||||
/* PCI registers */
|
||||
#define PCI_CFG_RETRY_TIMEOUT 0x041
|
||||
#define PCI_CFG_LINK_CTRL_VAL_L0S_EN 0x01
|
||||
#define PCI_CFG_LINK_CTRL_VAL_L1_EN 0x02
|
||||
|
||||
static void iwl_apm_config(struct iwl_trans *trans)
|
||||
{
|
||||
|
@ -688,8 +686,7 @@ static void iwl_apm_config(struct iwl_trans *trans)
|
|||
*/
|
||||
|
||||
pcie_capability_read_word(trans_pcie->pci_dev, PCI_EXP_LNKCTL, &lctl);
|
||||
if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) ==
|
||||
PCI_CFG_LINK_CTRL_VAL_L1_EN) {
|
||||
if (lctl & PCI_EXP_LNKCTL_ASPM_L1) {
|
||||
/* L1-ASPM enabled; disable(!) L0S */
|
||||
iwl_set_bit(trans, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
|
||||
dev_printk(KERN_INFO, trans->dev,
|
||||
|
@ -700,7 +697,7 @@ static void iwl_apm_config(struct iwl_trans *trans)
|
|||
dev_printk(KERN_INFO, trans->dev,
|
||||
"L1 Disabled; Enabling L0S\n");
|
||||
}
|
||||
trans->pm_support = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN);
|
||||
trans->pm_support = !(lctl & PCI_EXP_LNKCTL_ASPM_L0S);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue