commit 73f3c89ee0e4ac99a4373067614c23fd71f7221e Author: Jiri Slaby Date: Sun Jul 15 09:26:12 2007 +0200 get/reset_tsf diff --git a/ath/if_ath_pci.c b/ath/if_ath_pci.c index 5b39237..5a1bdab 100644 --- a/ath/if_ath_pci.c +++ b/ath/if_ath_pci.c @@ -1093,6 +1093,20 @@ unlock: return ret; } +static u64 ath_get_tsf(struct ieee80211_hw *hw) +{ + struct ath_softc *sc = hw->priv; + + return ath5k_hw_get_tsf64(sc->ah); +} + +static void ath_reset_tsf(struct ieee80211_hw *hw) +{ + struct ath_softc *sc = hw->priv; + + ath5k_hw_reset_tsf(sc->ah); +} + static struct ieee80211_ops ath_hw_ops = { .tx = ath_tx, .reset = ath_reset, @@ -1105,10 +1119,10 @@ static struct ieee80211_ops ath_hw_ops = { .set_key = ath_set_key, /* .get_stats = , .conf_tx = , - .get_tx_stats = , - .get_tsf = , - .reset_tsf = , - .beacon_update = ,*/ + .get_tx_stats = ,*/ + .get_tsf = ath_get_tsf, + .reset_tsf = ath_reset_tsf, + .beacon_update = NULL, }; static irqreturn_t ath_intr(int irq, void *dev_id) diff --git a/openhal/ath5k_hw.c b/openhal/ath5k_hw.c index 5791170..db1d888 100644 --- a/openhal/ath5k_hw.c +++ b/openhal/ath5k_hw.c @@ -2800,8 +2800,7 @@ ath5k_hw_set_rx_filter(struct ath_hw *hal, u32 filter) /* * Get a 32bit TSF */ -u32 -ath5k_hw_get_tsf32(struct ath_hw *hal) +u32 ath5k_hw_get_tsf32(struct ath_hw *hal) { AR5K_TRACE; return ath5k_hw_reg_read(hal, AR5K_TSF_L32); @@ -2810,8 +2809,7 @@ ath5k_hw_get_tsf32(struct ath_hw *hal) /* * Get the full 64bit TSF */ -u64 -ath5k_hw_get_tsf64(struct ath_hw *hal) +u64 ath5k_hw_get_tsf64(struct ath_hw *hal) { u64 tsf = ath5k_hw_reg_read(hal, AR5K_TSF_U32); AR5K_TRACE; @@ -2822,12 +2820,10 @@ ath5k_hw_get_tsf64(struct ath_hw *hal) /* * Force a TSF reset */ -void -ath5k_hw_reset_tsf(struct ath_hw *hal) +void ath5k_hw_reset_tsf(struct ath_hw *hal) { AR5K_TRACE; - AR5K_REG_ENABLE_BITS(hal, AR5K_BEACON, - AR5K_BEACON_RESET_TSF); + AR5K_REG_ENABLE_BITS(hal, AR5K_BEACON, AR5K_BEACON_RESET_TSF); } /*