Commit a962cb29 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Simon Wunderlich

batman-adv: Drop legacy code for auto deleting mesh interfaces

The only way to automatically drop batadv mesh interfaces when all soft
interfaces were removed was dropped with the sysfs support. It is no longer
needed to have them handled by kernel anymore.
Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
parent aff6f5a6
...@@ -845,11 +845,8 @@ static size_t batadv_hardif_cnt(const struct net_device *soft_iface) ...@@ -845,11 +845,8 @@ static size_t batadv_hardif_cnt(const struct net_device *soft_iface)
/** /**
* batadv_hardif_disable_interface() - Remove hard interface from soft interface * batadv_hardif_disable_interface() - Remove hard interface from soft interface
* @hard_iface: hard interface to be removed * @hard_iface: hard interface to be removed
* @autodel: whether to delete soft interface when it doesn't contain any other
* slave interfaces
*/ */
void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface, void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface)
enum batadv_hard_if_cleanup autodel)
{ {
struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
struct batadv_hard_iface *primary_if = NULL; struct batadv_hard_iface *primary_if = NULL;
...@@ -953,8 +950,7 @@ static void batadv_hardif_remove_interface(struct batadv_hard_iface *hard_iface) ...@@ -953,8 +950,7 @@ static void batadv_hardif_remove_interface(struct batadv_hard_iface *hard_iface)
/* first deactivate interface */ /* first deactivate interface */
if (hard_iface->if_status != BATADV_IF_NOT_IN_USE) if (hard_iface->if_status != BATADV_IF_NOT_IN_USE)
batadv_hardif_disable_interface(hard_iface, batadv_hardif_disable_interface(hard_iface);
BATADV_IF_CLEANUP_KEEP);
if (hard_iface->if_status != BATADV_IF_NOT_IN_USE) if (hard_iface->if_status != BATADV_IF_NOT_IN_USE)
return; return;
......
...@@ -67,22 +67,6 @@ enum batadv_hard_if_bcast { ...@@ -67,22 +67,6 @@ enum batadv_hard_if_bcast {
BATADV_HARDIF_BCAST_DUPORIG, BATADV_HARDIF_BCAST_DUPORIG,
}; };
/**
* enum batadv_hard_if_cleanup - Cleanup modi for soft_iface after slave removal
*/
enum batadv_hard_if_cleanup {
/**
* @BATADV_IF_CLEANUP_KEEP: Don't automatically delete soft-interface
*/
BATADV_IF_CLEANUP_KEEP,
/**
* @BATADV_IF_CLEANUP_AUTO: Delete soft-interface after last slave was
* removed
*/
BATADV_IF_CLEANUP_AUTO,
};
extern struct notifier_block batadv_hard_if_notifier; extern struct notifier_block batadv_hard_if_notifier;
struct net_device *batadv_get_real_netdev(struct net_device *net_device); struct net_device *batadv_get_real_netdev(struct net_device *net_device);
...@@ -92,8 +76,7 @@ struct batadv_hard_iface* ...@@ -92,8 +76,7 @@ struct batadv_hard_iface*
batadv_hardif_get_by_netdev(const struct net_device *net_dev); batadv_hardif_get_by_netdev(const struct net_device *net_dev);
int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface,
struct net *net, const char *iface_name); struct net *net, const char *iface_name);
void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface, void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface);
enum batadv_hard_if_cleanup autodel);
int batadv_hardif_min_mtu(struct net_device *soft_iface); int batadv_hardif_min_mtu(struct net_device *soft_iface);
void batadv_update_min_mtu(struct net_device *soft_iface); void batadv_update_min_mtu(struct net_device *soft_iface);
void batadv_hardif_release(struct kref *ref); void batadv_hardif_release(struct kref *ref);
......
...@@ -881,7 +881,7 @@ static int batadv_softif_slave_del(struct net_device *dev, ...@@ -881,7 +881,7 @@ static int batadv_softif_slave_del(struct net_device *dev,
if (!hard_iface || hard_iface->soft_iface != dev) if (!hard_iface || hard_iface->soft_iface != dev)
goto out; goto out;
batadv_hardif_disable_interface(hard_iface, BATADV_IF_CLEANUP_KEEP); batadv_hardif_disable_interface(hard_iface);
ret = 0; ret = 0;
out: out:
...@@ -1139,8 +1139,7 @@ static void batadv_softif_destroy_netlink(struct net_device *soft_iface, ...@@ -1139,8 +1139,7 @@ static void batadv_softif_destroy_netlink(struct net_device *soft_iface,
list_for_each_entry(hard_iface, &batadv_hardif_list, list) { list_for_each_entry(hard_iface, &batadv_hardif_list, list) {
if (hard_iface->soft_iface == soft_iface) if (hard_iface->soft_iface == soft_iface)
batadv_hardif_disable_interface(hard_iface, batadv_hardif_disable_interface(hard_iface);
BATADV_IF_CLEANUP_KEEP);
} }
/* destroy the "untagged" VLAN */ /* destroy the "untagged" VLAN */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment