Move common checks into wrapper function. Since ASPM can be only enabled
on PCIe devices ->is_pciexpress check is unneeded.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
u8 i;
u32 val;
- if (ah->is_pciexpress != true || ah->aspm_enabled != true)
- return;
-
/* Nothing to do on restore for 11N */
if (!power_off /* !restore */) {
if (AR_SREV_9280_20_OR_LATER(ah)) {
static void ar9003_hw_configpcipowersave(struct ath_hw *ah,
bool power_off)
{
- if (ah->is_pciexpress != true || ah->aspm_enabled != true)
- return;
-
/* Nothing to do on restore for 11N */
if (!power_off /* !restore */) {
/* set bit 19 to allow forcing of pcie core into L1 state */
static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah,
bool power_off)
{
+ if (ah->aspm_enabled != true)
+ return;
+
ath9k_hw_ops(ah)->config_pci_powersave(ah, power_off);
}