From 9dfebcc6479c55c001e4bb5fe7cc16b6799c43a7 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Mon, 21 Jan 2008 00:26:07 -0800 Subject: [VLAN]: Turn VLAN_DEV_INFO into inline function Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- include/linux/if_vlan.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/linux/if_vlan.h') diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 129fa876dbe..82c23522a46 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -143,13 +143,16 @@ struct vlan_dev_info { unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ }; -#define VLAN_DEV_INFO(x) ((struct vlan_dev_info *)(x->priv)) +static inline struct vlan_dev_info *vlan_dev_info(const struct net_device *dev) +{ + return netdev_priv(dev); +} /* inline functions */ static inline __u32 vlan_get_ingress_priority(struct net_device *dev, unsigned short vlan_tag) { - struct vlan_dev_info *vip = VLAN_DEV_INFO(dev); + struct vlan_dev_info *vip = vlan_dev_info(dev); return vip->ingress_priority_map[(vlan_tag >> 13) & 0x7]; } -- cgit v1.2.3