diff options
Diffstat (limited to 'net/batman-adv/hard-interface.h')
-rw-r--r-- | net/batman-adv/hard-interface.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/net/batman-adv/hard-interface.h b/net/batman-adv/hard-interface.h index e68c5655e616..d66dabd620b7 100644 --- a/net/batman-adv/hard-interface.h +++ b/net/batman-adv/hard-interface.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* Copyright (C) 2007-2012 B.A.T.M.A.N. contributors: |
2 | * Copyright (C) 2007-2012 B.A.T.M.A.N. contributors: | ||
3 | * | 2 | * |
4 | * Marek Lindner, Simon Wunderlich | 3 | * Marek Lindner, Simon Wunderlich |
5 | * | 4 | * |
@@ -16,7 +15,6 @@ | |||
16 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
18 | * 02110-1301, USA | 17 | * 02110-1301, USA |
19 | * | ||
20 | */ | 18 | */ |
21 | 19 | ||
22 | #ifndef _NET_BATMAN_ADV_HARD_INTERFACE_H_ | 20 | #ifndef _NET_BATMAN_ADV_HARD_INTERFACE_H_ |
@@ -31,27 +29,28 @@ enum hard_if_state { | |||
31 | IF_I_WANT_YOU | 29 | IF_I_WANT_YOU |
32 | }; | 30 | }; |
33 | 31 | ||
34 | extern struct notifier_block hard_if_notifier; | 32 | extern struct notifier_block batadv_hard_if_notifier; |
35 | 33 | ||
36 | struct hard_iface* | 34 | struct hard_iface* |
37 | hardif_get_by_netdev(const struct net_device *net_dev); | 35 | batadv_hardif_get_by_netdev(const struct net_device *net_dev); |
38 | int hardif_enable_interface(struct hard_iface *hard_iface, | 36 | int batadv_hardif_enable_interface(struct hard_iface *hard_iface, |
39 | const char *iface_name); | 37 | const char *iface_name); |
40 | void hardif_disable_interface(struct hard_iface *hard_iface); | 38 | void batadv_hardif_disable_interface(struct hard_iface *hard_iface); |
41 | void hardif_remove_interfaces(void); | 39 | void batadv_hardif_remove_interfaces(void); |
42 | int hardif_min_mtu(struct net_device *soft_iface); | 40 | int batadv_hardif_min_mtu(struct net_device *soft_iface); |
43 | void update_min_mtu(struct net_device *soft_iface); | 41 | void batadv_update_min_mtu(struct net_device *soft_iface); |
44 | void hardif_free_rcu(struct rcu_head *rcu); | 42 | void batadv_hardif_free_rcu(struct rcu_head *rcu); |
45 | bool is_wifi_iface(int ifindex); | 43 | bool batadv_is_wifi_iface(int ifindex); |
46 | 44 | ||
47 | static inline void hardif_free_ref(struct hard_iface *hard_iface) | 45 | static inline void |
46 | batadv_hardif_free_ref(struct hard_iface *hard_iface) | ||
48 | { | 47 | { |
49 | if (atomic_dec_and_test(&hard_iface->refcount)) | 48 | if (atomic_dec_and_test(&hard_iface->refcount)) |
50 | call_rcu(&hard_iface->rcu, hardif_free_rcu); | 49 | call_rcu(&hard_iface->rcu, batadv_hardif_free_rcu); |
51 | } | 50 | } |
52 | 51 | ||
53 | static inline struct hard_iface *primary_if_get_selected( | 52 | static inline struct hard_iface * |
54 | struct bat_priv *bat_priv) | 53 | batadv_primary_if_get_selected(struct bat_priv *bat_priv) |
55 | { | 54 | { |
56 | struct hard_iface *hard_iface; | 55 | struct hard_iface *hard_iface; |
57 | 56 | ||