debugfs.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (C) 2010-2020 B.A.T.M.A.N. contributors:
  3. *
  4. * Marek Lindner
  5. */
  6. #ifndef _NET_BATMAN_ADV_DEBUGFS_H_
  7. #define _NET_BATMAN_ADV_DEBUGFS_H_
  8. #include "main.h"
  9. #include <linux/fs.h>
  10. #include <linux/netdevice.h>
  11. #define BATADV_DEBUGFS_SUBDIR "batman_adv"
  12. #if IS_ENABLED(CONFIG_BATMAN_ADV_DEBUGFS)
  13. void batadv_debugfs_deprecated(struct file *file, const char *alt);
  14. void batadv_debugfs_init(void);
  15. void batadv_debugfs_destroy(void);
  16. int batadv_debugfs_add_meshif(struct net_device *dev);
  17. void batadv_debugfs_rename_meshif(struct net_device *dev);
  18. void batadv_debugfs_del_meshif(struct net_device *dev);
  19. void batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface);
  20. void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface);
  21. void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface);
  22. #else
  23. static inline void batadv_debugfs_deprecated(struct file *file, const char *alt)
  24. {
  25. }
  26. static inline void batadv_debugfs_init(void)
  27. {
  28. }
  29. static inline void batadv_debugfs_destroy(void)
  30. {
  31. }
  32. static inline int batadv_debugfs_add_meshif(struct net_device *dev)
  33. {
  34. return 0;
  35. }
  36. static inline void batadv_debugfs_rename_meshif(struct net_device *dev)
  37. {
  38. }
  39. static inline void batadv_debugfs_del_meshif(struct net_device *dev)
  40. {
  41. }
  42. static inline
  43. void batadv_debugfs_add_hardif(struct batadv_hard_iface *hard_iface)
  44. {
  45. }
  46. static inline
  47. void batadv_debugfs_rename_hardif(struct batadv_hard_iface *hard_iface)
  48. {
  49. }
  50. static inline
  51. void batadv_debugfs_del_hardif(struct batadv_hard_iface *hard_iface)
  52. {
  53. }
  54. #endif
  55. #endif /* _NET_BATMAN_ADV_DEBUGFS_H_ */