Commit 3b9cf1be authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville

ath9k: merge common ->config_pci_powersave() checks

Move common checks into wrapper function. Since ASPM can be only enabled
on PCIe devices ->is_pciexpress check is unneeded.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 84c87dc8
...@@ -308,9 +308,6 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, ...@@ -308,9 +308,6 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
u8 i; u8 i;
u32 val; u32 val;
if (ah->is_pciexpress != true || ah->aspm_enabled != true)
return;
/* Nothing to do on restore for 11N */ /* Nothing to do on restore for 11N */
if (!power_off /* !restore */) { if (!power_off /* !restore */) {
if (AR_SREV_9280_20_OR_LATER(ah)) { if (AR_SREV_9280_20_OR_LATER(ah)) {
......
...@@ -518,9 +518,6 @@ static void ar9003_hw_init_mode_gain_regs(struct ath_hw *ah) ...@@ -518,9 +518,6 @@ static void ar9003_hw_init_mode_gain_regs(struct ath_hw *ah)
static void ar9003_hw_configpcipowersave(struct ath_hw *ah, static void ar9003_hw_configpcipowersave(struct ath_hw *ah,
bool power_off) bool power_off)
{ {
if (ah->is_pciexpress != true || ah->aspm_enabled != true)
return;
/* Nothing to do on restore for 11N */ /* Nothing to do on restore for 11N */
if (!power_off /* !restore */) { if (!power_off /* !restore */) {
/* set bit 19 to allow forcing of pcie core into L1 state */ /* set bit 19 to allow forcing of pcie core into L1 state */
......
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah, static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah,
bool power_off) bool power_off)
{ {
if (ah->aspm_enabled != true)
return;
ath9k_hw_ops(ah)->config_pci_powersave(ah, power_off); ath9k_hw_ops(ah)->config_pci_powersave(ah, power_off);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment