From fa205602d46e0b66c0c90672bce8b36e5de449df Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Tue, 1 Jun 2021 23:50:35 +0200 Subject: batman-adv: Avoid name based attaching of hard interfaces The sysfs code for the batman-adv/mesh_iface file was receiving a string of the batadv interface. This interface name was then provided to the code which shared sysfs+rtnetlink code for attaching an hard-interface to an batadv interface. The rtnetlink code was also using the (extracted) interface name from the ndo_add_slave callback to increase the shared code - even when it would have been more efficient to use the provided net_device object directly instead of searching it again (based on its name) in batadv_hardif_enable_interface. But this indirect handling is no longer necessary because the sysfs code was dropped. There is now only a single code path which is using batadv_hardif_enable_interface. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich --- net/batman-adv/hard-interface.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/batman-adv/hard-interface.h') diff --git a/net/batman-adv/hard-interface.h b/net/batman-adv/hard-interface.h index 83d11b46a9d8..8cb2a1f10080 100644 --- a/net/batman-adv/hard-interface.h +++ b/net/batman-adv/hard-interface.h @@ -16,7 +16,6 @@ #include #include #include -#include /** * enum batadv_hard_if_state - State of a hard interface @@ -75,7 +74,7 @@ bool batadv_is_wifi_hardif(struct batadv_hard_iface *hard_iface); struct batadv_hard_iface* batadv_hardif_get_by_netdev(const struct net_device *net_dev); int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, - struct net *net, const char *iface_name); + struct net_device *soft_iface); void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface); int batadv_hardif_min_mtu(struct net_device *soft_iface); void batadv_update_min_mtu(struct net_device *soft_iface); -- cgit v1.2.3