diff options
Diffstat (limited to 'net/batman-adv/hard-interface.h')
-rw-r--r-- | net/batman-adv/hard-interface.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/net/batman-adv/hard-interface.h b/net/batman-adv/hard-interface.h index 30ec3b8db45..a9ddf36e51c 100644 --- a/net/batman-adv/hard-interface.h +++ b/net/batman-adv/hard-interface.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007-2010 B.A.T.M.A.N. contributors: | 2 | * Copyright (C) 2007-2011 B.A.T.M.A.N. contributors: |
3 | * | 3 | * |
4 | * Marek Lindner, Simon Wunderlich | 4 | * Marek Lindner, Simon Wunderlich |
5 | * | 5 | * |
@@ -31,23 +31,18 @@ | |||
31 | 31 | ||
32 | extern struct notifier_block hard_if_notifier; | 32 | extern struct notifier_block hard_if_notifier; |
33 | 33 | ||
34 | struct batman_if *get_batman_if_by_netdev(struct net_device *net_dev); | 34 | struct hard_iface *hardif_get_by_netdev(struct net_device *net_dev); |
35 | int hardif_enable_interface(struct batman_if *batman_if, char *iface_name); | 35 | int hardif_enable_interface(struct hard_iface *hard_iface, char *iface_name); |
36 | void hardif_disable_interface(struct batman_if *batman_if); | 36 | void hardif_disable_interface(struct hard_iface *hard_iface); |
37 | void hardif_remove_interfaces(void); | 37 | void hardif_remove_interfaces(void); |
38 | int batman_skb_recv(struct sk_buff *skb, | ||
39 | struct net_device *dev, | ||
40 | struct packet_type *ptype, | ||
41 | struct net_device *orig_dev); | ||
42 | int hardif_min_mtu(struct net_device *soft_iface); | 38 | int hardif_min_mtu(struct net_device *soft_iface); |
43 | void update_min_mtu(struct net_device *soft_iface); | 39 | void update_min_mtu(struct net_device *soft_iface); |
40 | void hardif_free_rcu(struct rcu_head *rcu); | ||
44 | 41 | ||
45 | static inline void hardif_free_ref(struct kref *refcount) | 42 | static inline void hardif_free_ref(struct hard_iface *hard_iface) |
46 | { | 43 | { |
47 | struct batman_if *batman_if; | 44 | if (atomic_dec_and_test(&hard_iface->refcount)) |
48 | 45 | call_rcu(&hard_iface->rcu, hardif_free_rcu); | |
49 | batman_if = container_of(refcount, struct batman_if, refcount); | ||
50 | kfree(batman_if); | ||
51 | } | 46 | } |
52 | 47 | ||
53 | #endif /* _NET_BATMAN_ADV_HARD_INTERFACE_H_ */ | 48 | #endif /* _NET_BATMAN_ADV_HARD_INTERFACE_H_ */ |