aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2010-12-10 00:57:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:30 -0500
commit9abbfb27dd96361187bb3872b2c349a76f5e09e9 (patch)
treea204537654e99744f6a68bfaeb862dad5c00052e /drivers
parent44316cb1e97a1e7f76eb3f07e5b0ba91d72e9693 (diff)
ath9k: Use power save wrappers for TSF get/set
The HW has to be awake when accessing registers. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index ca35aaa7aec6..5b4ef81318f5 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1987,7 +1987,9 @@ static u64 ath9k_get_tsf(struct ieee80211_hw *hw)
1987 struct ath_softc *sc = aphy->sc; 1987 struct ath_softc *sc = aphy->sc;
1988 1988
1989 mutex_lock(&sc->mutex); 1989 mutex_lock(&sc->mutex);
1990 ath9k_ps_wakeup(sc);
1990 tsf = ath9k_hw_gettsf64(sc->sc_ah); 1991 tsf = ath9k_hw_gettsf64(sc->sc_ah);
1992 ath9k_ps_restore(sc);
1991 mutex_unlock(&sc->mutex); 1993 mutex_unlock(&sc->mutex);
1992 1994
1993 return tsf; 1995 return tsf;
@@ -1999,7 +2001,9 @@ static void ath9k_set_tsf(struct ieee80211_hw *hw, u64 tsf)
1999 struct ath_softc *sc = aphy->sc; 2001 struct ath_softc *sc = aphy->sc;
2000 2002
2001 mutex_lock(&sc->mutex); 2003 mutex_lock(&sc->mutex);
2004 ath9k_ps_wakeup(sc);
2002 ath9k_hw_settsf64(sc->sc_ah, tsf); 2005 ath9k_hw_settsf64(sc->sc_ah, tsf);
2006 ath9k_ps_restore(sc);
2003 mutex_unlock(&sc->mutex); 2007 mutex_unlock(&sc->mutex);
2004} 2008}
2005 2009