diff options
author | Sven Eckelmann <sven@narfation.org> | 2020-07-07 23:49:50 +0300 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2020-08-18 20:39:53 +0300 |
commit | c3b92dd49094397e7d3893a666adf2103958399f (patch) | |
tree | 25d81946df9aabb60ee6e827c6b4590703c6dec0 /net/batman-adv/hard-interface.c | |
parent | 426988ee84c1d03cd5e158b4a360e01459709e95 (diff) | |
download | linux-c3b92dd49094397e7d3893a666adf2103958399f.tar.xz |
batman-adv: Drop unused function batadv_hardif_remove_interfaces()
The function batadv_hardif_remove_interfaces was meant to remove all
interfaces which are currently in the list of known (compatible) hardifs
during module unload. But the function unregister_netdevice_notifier is
called in batadv_exit before batadv_hardif_remove_interfaces. This will
trigger NETDEV_UNREGISTER events for all available interfaces and in this
process remove all interfaces from batadv_hardif_list. And
batadv_hardif_remove_interfaces only operated on this (empty) list.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index fa06b51c0144..f95be90adaab 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -977,23 +977,6 @@ static void batadv_hardif_remove_interface(struct batadv_hard_iface *hard_iface) } /** - * batadv_hardif_remove_interfaces() - Remove all hard interfaces - */ -void batadv_hardif_remove_interfaces(void) -{ - struct batadv_hard_iface *hard_iface, *hard_iface_tmp; - - rtnl_lock(); - list_for_each_entry_safe(hard_iface, hard_iface_tmp, - &batadv_hardif_list, list) { - list_del_rcu(&hard_iface->list); - batadv_hardif_generation++; - batadv_hardif_remove_interface(hard_iface); - } - rtnl_unlock(); -} - -/** * batadv_hard_if_event_softif() - Handle events for soft interfaces * @event: NETDEV_* event to handle * @net_dev: net_device which generated an event |