summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/recv.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-11-03 16:10:46 -0800
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 17:09:04 -0500
commit30cbd42265546a3efa146d4eb3456165325c83a7 (patch)
tree4091f40bbba4a83bf383e2e4fc598bf08a059cd3 /drivers/net/wireless/ath/ath9k/recv.c
parent26ab2645b478fd98aa1d10a07eb07f2235bc1f1c (diff)
downloadblackbird-op-linux-30cbd42265546a3efa146d4eb3456165325c83a7.tar.gz
blackbird-op-linux-30cbd42265546a3efa146d4eb3456165325c83a7.zip
ath9k_hw: move ath_extend_tsf() to hw code to share as ath9k_hw_extend_tsf()
This will be shared between ath9k and ath9k_htc. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index fd45f775e1f6..b27ea89bbc97 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -87,20 +87,6 @@ static void ath_setdefantenna(struct ath_softc *sc, u32 antenna)
}
/*
- * Extend 15-bit time stamp from rx descriptor to
- * a full 64-bit TSF using the current h/w TSF.
-*/
-static u64 ath_extend_tsf(struct ath_softc *sc, u32 rstamp)
-{
- u64 tsf;
-
- tsf = ath9k_hw_gettsf64(sc->sc_ah);
- if ((tsf & 0x7fff) < rstamp)
- tsf -= 0x8000;
- return (tsf & ~0x7fff) | rstamp;
-}
-
-/*
* For Decrypt or Demic errors, we only mark packet status here and always push
* up the frame up to let mac80211 handle the actual error case, be it no
* decryption key or real decryption error. This let us keep statistics there.
@@ -223,7 +209,7 @@ static int ath_rx_prepare(struct ieee80211_hw *hw,
if (ieee80211_is_beacon(fc))
sc->sc_ah->stats.avgbrssi = rx_stats->rs_rssi;
- rx_status->mactime = ath_extend_tsf(sc, rx_stats->rs_tstamp);
+ rx_status->mactime = ath9k_hw_extend_tsf(sc->sc_ah, rx_stats->rs_tstamp);
rx_status->band = hw->conf.channel->band;
rx_status->freq = hw->conf.channel->center_freq;
rx_status->noise = sc->ani.noise_floor;
OpenPOWER on IntegriCloud