diff options
author | Alina Friedrichsen <x-alina@gmx.net> | 2009-01-22 23:33:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:20 -0500 |
commit | ae54c985cc7daa502da6e7eb3b223a30fbbf4cfb (patch) | |
tree | 5413843c91821e3115a6014f70d761705260efd4 | |
parent | 5f8e077c0adc0dc7cfad64cdc05276e1961a1394 (diff) |
mac80211: Read the TSF via debugfs
This patch adds an low-level driver independent entry to read the TSF value into the debugfs of mac80211. This makes debugging the IBSS handling of wifi drivers easier.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/debugfs.c | 4 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 18541bb75096..717d5484e1e5 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -61,6 +61,8 @@ DEBUGFS_READONLY_FILE(wep_iv, 20, "%#06x", | |||
61 | local->wep_iv & 0xffffff); | 61 | local->wep_iv & 0xffffff); |
62 | DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s", | 62 | DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s", |
63 | local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>"); | 63 | local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>"); |
64 | DEBUGFS_READONLY_FILE(tsf, 20, "%#018llx", | ||
65 | (unsigned long long) (local->ops->get_tsf ? local->ops->get_tsf(local_to_hw(local)) : 0)); | ||
64 | 66 | ||
65 | /* statistics stuff */ | 67 | /* statistics stuff */ |
66 | 68 | ||
@@ -202,6 +204,7 @@ void debugfs_hw_add(struct ieee80211_local *local) | |||
202 | DEBUGFS_ADD(long_retry_limit); | 204 | DEBUGFS_ADD(long_retry_limit); |
203 | DEBUGFS_ADD(total_ps_buffered); | 205 | DEBUGFS_ADD(total_ps_buffered); |
204 | DEBUGFS_ADD(wep_iv); | 206 | DEBUGFS_ADD(wep_iv); |
207 | DEBUGFS_ADD(tsf); | ||
205 | 208 | ||
206 | statsd = debugfs_create_dir("statistics", phyd); | 209 | statsd = debugfs_create_dir("statistics", phyd); |
207 | local->debugfs.statistics = statsd; | 210 | local->debugfs.statistics = statsd; |
@@ -255,6 +258,7 @@ void debugfs_hw_del(struct ieee80211_local *local) | |||
255 | DEBUGFS_DEL(long_retry_limit); | 258 | DEBUGFS_DEL(long_retry_limit); |
256 | DEBUGFS_DEL(total_ps_buffered); | 259 | DEBUGFS_DEL(total_ps_buffered); |
257 | DEBUGFS_DEL(wep_iv); | 260 | DEBUGFS_DEL(wep_iv); |
261 | DEBUGFS_DEL(tsf); | ||
258 | 262 | ||
259 | DEBUGFS_STATS_DEL(transmitted_fragment_count); | 263 | DEBUGFS_STATS_DEL(transmitted_fragment_count); |
260 | DEBUGFS_STATS_DEL(multicast_transmitted_frame_count); | 264 | DEBUGFS_STATS_DEL(multicast_transmitted_frame_count); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 70366efc792e..927cbde8c19c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -744,6 +744,7 @@ struct ieee80211_local { | |||
744 | struct dentry *long_retry_limit; | 744 | struct dentry *long_retry_limit; |
745 | struct dentry *total_ps_buffered; | 745 | struct dentry *total_ps_buffered; |
746 | struct dentry *wep_iv; | 746 | struct dentry *wep_iv; |
747 | struct dentry *tsf; | ||
747 | struct dentry *statistics; | 748 | struct dentry *statistics; |
748 | struct local_debugfsdentries_statsdentries { | 749 | struct local_debugfsdentries_statsdentries { |
749 | struct dentry *transmitted_fragment_count; | 750 | struct dentry *transmitted_fragment_count; |