blob: 37b069698b04b369e68e4e8a31c3ac01575b0178 [file] [log] [blame]
Sven Eckelmann7db7d9f2017-11-19 15:05:11 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sven Eckelmann6b1aea82018-01-01 00:00:00 +01002/* Copyright (C) 2010-2018 B.A.T.M.A.N. contributors:
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +00003 *
4 * Marek Lindner
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
Antonio Quartulliebf38fb2013-11-03 20:40:48 +010016 * along with this program; if not, see <http://www.gnu.org/licenses/>.
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000017 */
18
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000019#ifndef _NET_BATMAN_ADV_DEBUGFS_H_
20#define _NET_BATMAN_ADV_DEBUGFS_H_
21
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020022#include "main.h"
23
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020024struct net_device;
25
Sven Eckelmann54590e42012-06-03 22:19:08 +020026#define BATADV_DEBUGFS_SUBDIR "batman_adv"
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000027
Sven Eckelmanndc1cbd12016-07-16 09:31:20 +020028#if IS_ENABLED(CONFIG_BATMAN_ADV_DEBUGFS)
Markus Pargmann9bb21882014-12-26 12:41:18 +010029
Sven Eckelmann40a072d2012-05-12 02:09:23 +020030void batadv_debugfs_init(void);
31void batadv_debugfs_destroy(void);
32int batadv_debugfs_add_meshif(struct net_device *dev);
33void batadv_debugfs_del_meshif(struct net_device *dev);
Simon Wunderlich5bc7c1e2013-11-21 14:16:12 +010034int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface);
35void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface);
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000036
Markus Pargmann9bb21882014-12-26 12:41:18 +010037#else
38
39static inline void batadv_debugfs_init(void)
40{
41}
42
43static inline void batadv_debugfs_destroy(void)
44{
45}
46
47static inline int batadv_debugfs_add_meshif(struct net_device *dev)
48{
49 return 0;
50}
51
52static inline void batadv_debugfs_del_meshif(struct net_device *dev)
53{
54}
55
56static inline
57int batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface)
58{
59 return 0;
60}
61
62static inline
63void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface)
64{
65}
66
67#endif
68
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000069#endif /* _NET_BATMAN_ADV_DEBUGFS_H_ */