aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_vlan.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-21 03:26:07 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:32 -0500
commit9dfebcc6479c55c001e4bb5fe7cc16b6799c43a7 (patch)
treed933aad54aa6025d0394b48a4a816867c1333e3e /include/linux/if_vlan.h
parentaf30151709bcace1ca844d4bb8b7e2e392ff81eb (diff)
[VLAN]: Turn VLAN_DEV_INFO into inline function
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r--include/linux/if_vlan.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 129fa876dbe4..82c23522a46d 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -143,13 +143,16 @@ struct vlan_dev_info {
143 unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ 143 unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */
144}; 144};
145 145
146#define VLAN_DEV_INFO(x) ((struct vlan_dev_info *)(x->priv)) 146static inline struct vlan_dev_info *vlan_dev_info(const struct net_device *dev)
147{
148 return netdev_priv(dev);
149}
147 150
148/* inline functions */ 151/* inline functions */
149static inline __u32 vlan_get_ingress_priority(struct net_device *dev, 152static inline __u32 vlan_get_ingress_priority(struct net_device *dev,
150 unsigned short vlan_tag) 153 unsigned short vlan_tag)
151{ 154{
152 struct vlan_dev_info *vip = VLAN_DEV_INFO(dev); 155 struct vlan_dev_info *vip = vlan_dev_info(dev);
153 156
154 return vip->ingress_priority_map[(vlan_tag >> 13) & 0x7]; 157 return vip->ingress_priority_map[(vlan_tag >> 13) & 0x7];
155} 158}