diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-08-28 17:01:55 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:54 -0400 |
commit | e7a64f12a452d39ab50e5580e93bc48b3b15f30c (patch) | |
tree | 048a398ce157b7319e039d1fb0a6d45a99f295b0 /net/mac80211/debugfs_key.c | |
parent | 11a843b7e16062389c53ba393c7913956e034eb2 (diff) |
[MAC80211]: add interface index to key debugfs
Add a new file 'ifindex' to each key's debugfs dir to
allow finding which interface the key was configured on.
This isn't done as a symlink because of possible netdev
name changes.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/debugfs_key.c')
-rw-r--r-- | net/mac80211/debugfs_key.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c index 36e7812da556..8e4a1bcd16ea 100644 --- a/net/mac80211/debugfs_key.c +++ b/net/mac80211/debugfs_key.c | |||
@@ -56,6 +56,8 @@ KEY_CONF_FILE(keyidx, D); | |||
56 | KEY_CONF_FILE(hw_key_idx, D); | 56 | KEY_CONF_FILE(hw_key_idx, D); |
57 | KEY_FILE(flags, X); | 57 | KEY_FILE(flags, X); |
58 | KEY_FILE(tx_rx_count, D); | 58 | KEY_FILE(tx_rx_count, D); |
59 | KEY_READ(ifindex, sdata->dev->ifindex, 20, "%d\n"); | ||
60 | KEY_OPS(ifindex); | ||
59 | 61 | ||
60 | static ssize_t key_algorithm_read(struct file *file, | 62 | static ssize_t key_algorithm_read(struct file *file, |
61 | char __user *userbuf, | 63 | char __user *userbuf, |
@@ -209,6 +211,7 @@ void ieee80211_debugfs_key_add(struct ieee80211_local *local, | |||
209 | DEBUGFS_ADD(rx_spec); | 211 | DEBUGFS_ADD(rx_spec); |
210 | DEBUGFS_ADD(replays); | 212 | DEBUGFS_ADD(replays); |
211 | DEBUGFS_ADD(key); | 213 | DEBUGFS_ADD(key); |
214 | DEBUGFS_ADD(ifindex); | ||
212 | }; | 215 | }; |
213 | 216 | ||
214 | #define DEBUGFS_DEL(name) \ | 217 | #define DEBUGFS_DEL(name) \ |
@@ -229,6 +232,7 @@ void ieee80211_debugfs_key_remove(struct ieee80211_key *key) | |||
229 | DEBUGFS_DEL(rx_spec); | 232 | DEBUGFS_DEL(rx_spec); |
230 | DEBUGFS_DEL(replays); | 233 | DEBUGFS_DEL(replays); |
231 | DEBUGFS_DEL(key); | 234 | DEBUGFS_DEL(key); |
235 | DEBUGFS_DEL(ifindex); | ||
232 | 236 | ||
233 | debugfs_remove(key->debugfs.stalink); | 237 | debugfs_remove(key->debugfs.stalink); |
234 | key->debugfs.stalink = NULL; | 238 | key->debugfs.stalink = NULL; |