ath9k: merge a pending patch for fixing tsf read and write
authorFelix Fietkau <nbd@openwrt.org>
Sat, 11 Dec 2010 21:29:35 +0000 (21:29 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 11 Dec 2010 21:29:35 +0000 (21:29 +0000)
SVN-Revision: 24496

package/mac80211/patches/320-ath9k_pending_work.patch

index ba40fe8194c5ebc07c2202f9223447a16a7154bb..baeeb064b69aad15122aa14a749bb293ec454aea 100644 (file)
  }
  
  /* This should work for all families including legacy */
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -1940,7 +1940,9 @@ static u64 ath9k_get_tsf(struct ieee8021
+       struct ath_softc *sc = aphy->sc;
+       mutex_lock(&sc->mutex);
++      ath9k_ps_wakeup(sc);
+       tsf = ath9k_hw_gettsf64(sc->sc_ah);
++      ath9k_ps_restore(sc);
+       mutex_unlock(&sc->mutex);
+       return tsf;
+@@ -1952,7 +1954,9 @@ static void ath9k_set_tsf(struct ieee802
+       struct ath_softc *sc = aphy->sc;
+       mutex_lock(&sc->mutex);
++      ath9k_ps_wakeup(sc);
+       ath9k_hw_settsf64(sc->sc_ah, tsf);
++      ath9k_ps_restore(sc);
+       mutex_unlock(&sc->mutex);
+ }