batman-adv: Prefix hard-interface non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.
Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 8fe70b4..8e40836 100644
--- a/net/batman-adv/main.c
+++ b/net/batman-adv/main.c
@@ -68,7 +68,7 @@
bat_socket_init();
batadv_debugfs_init();
- register_netdevice_notifier(&hard_if_notifier);
+ register_netdevice_notifier(&batadv_hard_if_notifier);
pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n",
SOURCE_VERSION, COMPAT_VERSION);
@@ -79,8 +79,8 @@
static void __exit batman_exit(void)
{
batadv_debugfs_destroy();
- unregister_netdevice_notifier(&hard_if_notifier);
- hardif_remove_interfaces();
+ unregister_netdevice_notifier(&batadv_hard_if_notifier);
+ batadv_hardif_remove_interfaces();
flush_workqueue(bat_event_workqueue);
destroy_workqueue(bat_event_workqueue);