diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-09-07 08:16:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-09 11:18:57 -0400 |
commit | 7b6840ab5f836a18c4ea98173f73c8d046930efb (patch) | |
tree | 61533a306fddb70e61cae6f37d5fb57973e59516 /drivers | |
parent | 72c706b775777e8ae546756a5d07ffda4a05ed7b (diff) |
ath9k: Disable ASPM when btcoex is active
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 1 |
3 files changed, 20 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 | */ | ||
4306 | void 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 | } | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 5ca6ffa70912..a592f1a46ecd 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -665,4 +665,9 @@ void ath_gen_timer_free(struct ath_hw *ah, struct ath_gen_timer *timer); | |||
665 | void ath_gen_timer_isr(struct ath_hw *hw); | 665 | void ath_gen_timer_isr(struct ath_hw *hw); |
666 | u32 ath9k_hw_gettsf32(struct ath_hw *ah); | 666 | u32 ath9k_hw_gettsf32(struct ath_hw *ah); |
667 | 667 | ||
668 | #define ATH_PCIE_CAP_LINK_CTRL 0x70 | ||
669 | #define ATH_PCIE_CAP_LINK_L0S 1 | ||
670 | #define ATH_PCIE_CAP_LINK_L1 2 | ||
671 | |||
672 | void ath_pcie_aspm_disable(struct ath_softc *sc); | ||
668 | #endif | 673 | #endif |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a69fda8a9102..ce011ab5e89d 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -2010,6 +2010,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
2010 | AR_STOMP_LOW_WLAN_WGHT); | 2010 | AR_STOMP_LOW_WLAN_WGHT); |
2011 | ath9k_hw_btcoex_enable(sc->sc_ah); | 2011 | ath9k_hw_btcoex_enable(sc->sc_ah); |
2012 | 2012 | ||
2013 | ath_pcie_aspm_disable(sc); | ||
2013 | if (sc->btcoex_info.btcoex_scheme == ATH_BTCOEX_CFG_3WIRE) | 2014 | if (sc->btcoex_info.btcoex_scheme == ATH_BTCOEX_CFG_3WIRE) |
2014 | ath_btcoex_timer_resume(sc, &sc->btcoex_info); | 2015 | ath_btcoex_timer_resume(sc, &sc->btcoex_info); |
2015 | } | 2016 | } |