aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/debugfs.c')
-rw-r--r--net/batman-adv/debugfs.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/batman-adv/debugfs.c b/net/batman-adv/debugfs.c
index 952900466d88..f187a8ff2184 100644
--- a/net/batman-adv/debugfs.c
+++ b/net/batman-adv/debugfs.c
@@ -48,6 +48,7 @@
48#include "distributed-arp-table.h" 48#include "distributed-arp-table.h"
49#include "gateway_client.h" 49#include "gateway_client.h"
50#include "icmp_socket.h" 50#include "icmp_socket.h"
51#include "multicast.h"
51#include "network-coding.h" 52#include "network-coding.h"
52#include "originator.h" 53#include "originator.h"
53#include "translation-table.h" 54#include "translation-table.h"
@@ -363,6 +364,22 @@ static int batadv_nc_nodes_open(struct inode *inode, struct file *file)
363} 364}
364#endif 365#endif
365 366
367#ifdef CONFIG_BATMAN_ADV_MCAST
368/**
369 * batadv_mcast_flags_open - prepare file handler for reads from mcast_flags
370 * @inode: inode which was opened
371 * @file: file handle to be initialized
372 *
373 * Return: 0 on success or negative error number in case of failure
374 */
375static int batadv_mcast_flags_open(struct inode *inode, struct file *file)
376{
377 struct net_device *net_dev = (struct net_device *)inode->i_private;
378
379 return single_open(file, batadv_mcast_flags_seq_print_text, net_dev);
380}
381#endif
382
366#define BATADV_DEBUGINFO(_name, _mode, _open) \ 383#define BATADV_DEBUGINFO(_name, _mode, _open) \
367struct batadv_debuginfo batadv_debuginfo_##_name = { \ 384struct batadv_debuginfo batadv_debuginfo_##_name = { \
368 .attr = { \ 385 .attr = { \
@@ -407,6 +424,9 @@ static BATADV_DEBUGINFO(transtable_local, S_IRUGO,
407#ifdef CONFIG_BATMAN_ADV_NC 424#ifdef CONFIG_BATMAN_ADV_NC
408static BATADV_DEBUGINFO(nc_nodes, S_IRUGO, batadv_nc_nodes_open); 425static BATADV_DEBUGINFO(nc_nodes, S_IRUGO, batadv_nc_nodes_open);
409#endif 426#endif
427#ifdef CONFIG_BATMAN_ADV_MCAST
428static BATADV_DEBUGINFO(mcast_flags, S_IRUGO, batadv_mcast_flags_open);
429#endif
410 430
411static struct batadv_debuginfo *batadv_mesh_debuginfos[] = { 431static struct batadv_debuginfo *batadv_mesh_debuginfos[] = {
412 &batadv_debuginfo_neighbors, 432 &batadv_debuginfo_neighbors,
@@ -424,6 +444,9 @@ static struct batadv_debuginfo *batadv_mesh_debuginfos[] = {
424#ifdef CONFIG_BATMAN_ADV_NC 444#ifdef CONFIG_BATMAN_ADV_NC
425 &batadv_debuginfo_nc_nodes, 445 &batadv_debuginfo_nc_nodes,
426#endif 446#endif
447#ifdef CONFIG_BATMAN_ADV_MCAST
448 &batadv_debuginfo_mcast_flags,
449#endif
427 NULL, 450 NULL,
428}; 451};
429 452