summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/hw.c
diff options
context:
space:
mode:
authorAlina Friedrichsen <x-alina@gmx.net>2009-01-23 04:44:21 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 21:01:22 (GMT)
commit27abe060aa9d3410545ef663676c7183fc2512c6 (patch)
tree33dc2e0c3e783a0446e92436540c69a87778b48e /drivers/net/wireless/ath9k/hw.c
parent8cab7581dba90b0519e25784e08feb5dedde737f (diff)
downloadlinux-fsl-qoriq-27abe060aa9d3410545ef663676c7183fc2512c6.tar.xz
ath9k: Read and write the TSF via debugfs
This patch adds an ath9k specific entry to read, write and reset the TSF into the debugfs, like in ath5k. 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/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath9k/hw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c
index f2922ba..1a497431 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -3755,6 +3755,13 @@ u64 ath9k_hw_gettsf64(struct ath_hal *ah)
return tsf;
}
+void ath9k_hw_settsf64(struct ath_hal *ah, u64 tsf64)
+{
+ REG_WRITE(ah, AR_TSF_L32, 0x00000000);
+ REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff);
+ REG_WRITE(ah, AR_TSF_L32, tsf64 & 0xffffffff);
+}
+
void ath9k_hw_reset_tsf(struct ath_hal *ah)
{
int count;