aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath5k/pcu.c
diff options
context:
space:
mode:
authorAlina Friedrichsen <x-alina@gmx.net>2009-01-22 23:39:13 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:21 -0500
commit8cab7581dba90b0519e25784e08feb5dedde737f (patch)
tree6ce5687004bf964e020203b0d24c241a505678b7 /drivers/net/wireless/ath5k/pcu.c
parentae54c985cc7daa502da6e7eb3b223a30fbbf4cfb (diff)
ath5k: Read and write the TSF via debugfs
This patch updates the ath5k specific entry in the debugfs to read and reset the TSF value, to allowing write it, too. This makes debugging the IBSS handling of wifi drivers _much_ easier. Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath5k/pcu.c')
-rw-r--r--drivers/net/wireless/ath5k/pcu.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index 86f53a55b0f7..f8a4a6960270 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -646,6 +646,23 @@ u64 ath5k_hw_get_tsf64(struct ath5k_hw *ah)
646} 646}
647 647
648/** 648/**
649 * ath5k_hw_set_tsf64 - Set a new 64bit TSF
650 *
651 * @ah: The &struct ath5k_hw
652 * @tsf64: The new 64bit TSF
653 *
654 * Sets the new TSF
655 */
656void ath5k_hw_set_tsf64(struct ath5k_hw *ah, u64 tsf64)
657{
658 ATH5K_TRACE(ah->ah_sc);
659
660 ath5k_hw_reg_write(ah, 0x00000000, AR5K_TSF_L32);
661 ath5k_hw_reg_write(ah, (tsf64 >> 32) & 0xffffffff, AR5K_TSF_U32);
662 ath5k_hw_reg_write(ah, tsf64 & 0xffffffff, AR5K_TSF_L32);
663}
664
665/**
649 * ath5k_hw_reset_tsf - Force a TSF reset 666 * ath5k_hw_reset_tsf - Force a TSF reset
650 * 667 *
651 * @ah: The &struct ath5k_hw 668 * @ah: The &struct ath5k_hw