diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/common.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 318ed3c9fe74..7e16d10a7f14 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -1183,9 +1183,10 @@ EXPORT_SYMBOL(il_power_update_mode); | |||
1183 | void | 1183 | void |
1184 | il_power_initialize(struct il_priv *il) | 1184 | il_power_initialize(struct il_priv *il) |
1185 | { | 1185 | { |
1186 | u16 lctl = il_pcie_link_ctl(il); | 1186 | u16 lctl; |
1187 | 1187 | ||
1188 | il->power_data.pci_pm = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); | 1188 | pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl); |
1189 | il->power_data.pci_pm = !(lctl & PCI_EXP_LNKCTL_ASPM_L0S); | ||
1189 | 1190 | ||
1190 | il->power_data.debug_sleep_level_override = -1; | 1191 | il->power_data.debug_sleep_level_override = -1; |
1191 | 1192 | ||
@@ -4233,9 +4234,8 @@ il_apm_init(struct il_priv *il) | |||
4233 | * power savings, even without L1. | 4234 | * power savings, even without L1. |
4234 | */ | 4235 | */ |
4235 | if (il->cfg->set_l0s) { | 4236 | if (il->cfg->set_l0s) { |
4236 | lctl = il_pcie_link_ctl(il); | 4237 | pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl); |
4237 | if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == | 4238 | if (lctl & PCI_EXP_LNKCTL_ASPM_L1) { |
4238 | PCI_CFG_LINK_CTRL_VAL_L1_EN) { | ||
4239 | /* L1-ASPM enabled; disable(!) L0S */ | 4239 | /* L1-ASPM enabled; disable(!) L0S */ |
4240 | il_set_bit(il, CSR_GIO_REG, | 4240 | il_set_bit(il, CSR_GIO_REG, |
4241 | CSR_GIO_REG_VAL_L0S_ENABLED); | 4241 | CSR_GIO_REG_VAL_L0S_ENABLED); |