diff options
author | Jiri Benc <jbenc@suse.cz> | 2007-05-05 14:46:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-05-05 14:46:38 -0400 |
commit | e9f207f0ff90bf60b825800d7450e6f2ff2eab88 (patch) | |
tree | 22bd39116f2cae8d4ce6169eb91e4b9a7204770f /net/mac80211/ieee80211_rate.h | |
parent | f0706e828e96d0fa4e80c0d25aa98523f6d589a0 (diff) |
[MAC80211]: Add debugfs attributes.
Export various mac80211 internal variables through debugfs.
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/ieee80211_rate.h')
-rw-r--r-- | net/mac80211/ieee80211_rate.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_rate.h b/net/mac80211/ieee80211_rate.h index 710f5685cedd..f021a028d9d0 100644 --- a/net/mac80211/ieee80211_rate.h +++ b/net/mac80211/ieee80211_rate.h | |||
@@ -56,6 +56,9 @@ struct rate_control_ops { | |||
56 | 56 | ||
57 | int (*add_attrs)(void *priv, struct kobject *kobj); | 57 | int (*add_attrs)(void *priv, struct kobject *kobj); |
58 | void (*remove_attrs)(void *priv, struct kobject *kobj); | 58 | void (*remove_attrs)(void *priv, struct kobject *kobj); |
59 | void (*add_sta_debugfs)(void *priv, void *priv_sta, | ||
60 | struct dentry *dir); | ||
61 | void (*remove_sta_debugfs)(void *priv, void *priv_sta); | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | struct rate_control_ref { | 64 | struct rate_control_ref { |
@@ -119,4 +122,23 @@ static inline void rate_control_free_sta(struct rate_control_ref *ref, | |||
119 | ref->ops->free_sta(ref->priv, priv); | 122 | ref->ops->free_sta(ref->priv, priv); |
120 | } | 123 | } |
121 | 124 | ||
125 | static inline void rate_control_add_sta_debugfs(struct sta_info *sta) | ||
126 | { | ||
127 | #ifdef CONFIG_MAC80211_DEBUGFS | ||
128 | struct rate_control_ref *ref = sta->rate_ctrl; | ||
129 | if (sta->debugfs.dir && ref->ops->add_sta_debugfs) | ||
130 | ref->ops->add_sta_debugfs(ref->priv, sta->rate_ctrl_priv, | ||
131 | sta->debugfs.dir); | ||
132 | #endif | ||
133 | } | ||
134 | |||
135 | static inline void rate_control_remove_sta_debugfs(struct sta_info *sta) | ||
136 | { | ||
137 | #ifdef CONFIG_MAC80211_DEBUGFS | ||
138 | struct rate_control_ref *ref = sta->rate_ctrl; | ||
139 | if (ref->ops->remove_sta_debugfs) | ||
140 | ref->ops->remove_sta_debugfs(ref->priv, sta->rate_ctrl_priv); | ||
141 | #endif | ||
142 | } | ||
143 | |||
122 | #endif /* IEEE80211_RATE_H */ | 144 | #endif /* IEEE80211_RATE_H */ |