32
32
extern struct notifier_block hard_if_notifier;
34
struct batman_if *get_batman_if_by_netdev(struct net_device *net_dev);
35
int hardif_enable_interface(struct batman_if *batman_if, char *iface_name);
36
void hardif_disable_interface(struct batman_if *batman_if);
34
struct hard_iface *hardif_get_by_netdev(struct net_device *net_dev);
35
int hardif_enable_interface(struct hard_iface *hard_iface, char *iface_name);
36
void hardif_disable_interface(struct hard_iface *hard_iface);
37
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
38
int hardif_min_mtu(struct net_device *soft_iface);
43
39
void update_min_mtu(struct net_device *soft_iface);
45
static inline void hardif_free_ref(struct kref *refcount)
47
struct batman_if *batman_if;
49
batman_if = container_of(refcount, struct batman_if, refcount);
40
void hardif_free_rcu(struct rcu_head *rcu);
42
static inline void hardif_free_ref(struct hard_iface *hard_iface)
44
if (atomic_dec_and_test(&hard_iface->refcount))
45
call_rcu(&hard_iface->rcu, hardif_free_rcu);
48
static inline struct hard_iface *primary_if_get_selected(
49
struct bat_priv *bat_priv)
51
struct hard_iface *hard_iface;
54
hard_iface = rcu_dereference(bat_priv->primary_if);
58
if (!atomic_inc_not_zero(&hard_iface->refcount))
53
66
#endif /* _NET_BATMAN_ADV_HARD_INTERFACE_H_ */