aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hard-interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/hard-interface.h')
-rw-r--r--net/batman-adv/hard-interface.h21
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
32extern struct notifier_block hard_if_notifier; 32extern struct notifier_block hard_if_notifier;
33 33
34struct batman_if *get_batman_if_by_netdev(struct net_device *net_dev); 34struct hard_iface *hardif_get_by_netdev(struct net_device *net_dev);
35int hardif_enable_interface(struct batman_if *batman_if, char *iface_name); 35int hardif_enable_interface(struct hard_iface *hard_iface, char *iface_name);
36void hardif_disable_interface(struct batman_if *batman_if); 36void hardif_disable_interface(struct hard_iface *hard_iface);
37void hardif_remove_interfaces(void); 37void hardif_remove_interfaces(void);
38int batman_skb_recv(struct sk_buff *skb,
39 struct net_device *dev,
40 struct packet_type *ptype,
41 struct net_device *orig_dev);
42int hardif_min_mtu(struct net_device *soft_iface); 38int hardif_min_mtu(struct net_device *soft_iface);
43void update_min_mtu(struct net_device *soft_iface); 39void update_min_mtu(struct net_device *soft_iface);
40void hardif_free_rcu(struct rcu_head *rcu);
44 41
45static inline void hardif_free_ref(struct kref *refcount) 42static 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_ */