aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/debugfs.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon@open-mesh.com>2013-11-21 11:52:16 +0100
committerAntonio Quartulli <antonio@meshcoding.com>2014-01-12 14:41:16 +0100
commitcb1c92ec37fb70543d133a1fa7d9b54d6f8a1ecd (patch)
tree5629a86404cd0aab5cffabfa5f769d550685f151 /net/batman-adv/debugfs.c
parentbatman-adv: add debugfs structure for information per interface (diff)
downloadlinux-dev-cb1c92ec37fb70543d133a1fa7d9b54d6f8a1ecd.tar.xz
linux-dev-cb1c92ec37fb70543d133a1fa7d9b54d6f8a1ecd.zip
batman-adv: add debugfs support to view multiif tables
Show tables for the multi interface operation. Originator tables are added per hard interface. This patch also changes the API by adding the interface to the bat_orig_print() parameters. Signed-off-by: Simon Wunderlich <simon@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/debugfs.c')
-rw-r--r--net/batman-adv/debugfs.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/batman-adv/debugfs.c b/net/batman-adv/debugfs.c
index 2ea36952139a..26cbf34fca03 100644
--- a/net/batman-adv/debugfs.c
+++ b/net/batman-adv/debugfs.c
@@ -248,6 +248,19 @@ static int batadv_originators_open(struct inode *inode, struct file *file)
return single_open(file, batadv_orig_seq_print_text, net_dev);
}
+/**
+ * batadv_originators_hardif_open - handles debugfs output for the
+ * originator table of an hard interface
+ * @inode: inode pointer to debugfs file
+ * @file: pointer to the seq_file
+ */
+static int batadv_originators_hardif_open(struct inode *inode,
+ struct file *file)
+{
+ struct net_device *net_dev = (struct net_device *)inode->i_private;
+ return single_open(file, batadv_orig_hardif_seq_print_text, net_dev);
+}
+
static int batadv_gateways_open(struct inode *inode, struct file *file)
{
struct net_device *net_dev = (struct net_device *)inode->i_private;
@@ -383,8 +396,11 @@ struct batadv_debuginfo batadv_hardif_debuginfo_##_name = { \
.release = single_release, \
}, \
};
+static BATADV_HARDIF_DEBUGINFO(originators, S_IRUGO,
+ batadv_originators_hardif_open);
static struct batadv_debuginfo *batadv_hardif_debuginfos[] = {
+ &batadv_hardif_debuginfo_originators,
NULL,
};