aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 011b14f35e50..97a09dba76de 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/io.h> 17#include <linux/io.h>
18#include <asm/unaligned.h> 18#include <asm/unaligned.h>
19#include <linux/pci.h>
19 20
20#include "ath9k.h" 21#include "ath9k.h"
21#include "initvals.h" 22#include "initvals.h"
@@ -4298,3 +4299,16 @@ void ath_gen_timer_isr(struct ath_hw *ah)
4298 timer->trigger(timer->arg); 4299 timer->trigger(timer->arg);
4299 } 4300 }
4300} 4301}
4302
4303/*
4304 * Primitive to disable ASPM
4305 */
4306void ath_pcie_aspm_disable(struct ath_softc *sc)
4307{
4308 struct pci_dev *pdev = to_pci_dev(sc->dev);
4309 u8 aspm;
4310
4311 pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm);
4312 aspm &= ~(ATH_PCIE_CAP_LINK_L0S | ATH_PCIE_CAP_LINK_L1);
4313 pci_write_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, aspm);
4314}