diff options
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r-- | include/linux/if_vlan.h | 56 |
1 files changed, 15 insertions, 41 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 594cd35b0074..cb2e6b480882 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -109,47 +109,6 @@ static inline void vlan_group_set_device(struct vlan_group *vg, | |||
109 | array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev; | 109 | array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev; |
110 | } | 110 | } |
111 | 111 | ||
112 | struct vlan_priority_tci_mapping { | ||
113 | u32 priority; | ||
114 | unsigned short vlan_qos; /* This should be shifted when first set, so we only do it | ||
115 | * at provisioning time. | ||
116 | * ((skb->priority << 13) & 0xE000) | ||
117 | */ | ||
118 | struct vlan_priority_tci_mapping *next; | ||
119 | }; | ||
120 | |||
121 | /* Holds information that makes sense if this device is a VLAN device. */ | ||
122 | struct vlan_dev_info { | ||
123 | /** This will be the mapping that correlates skb->priority to | ||
124 | * 3 bits of VLAN QOS tags... | ||
125 | */ | ||
126 | unsigned int nr_ingress_mappings; | ||
127 | u32 ingress_priority_map[8]; | ||
128 | |||
129 | unsigned int nr_egress_mappings; | ||
130 | struct vlan_priority_tci_mapping *egress_priority_map[16]; /* hash table */ | ||
131 | |||
132 | unsigned short vlan_id; /* The VLAN Identifier for this interface. */ | ||
133 | unsigned short flags; /* (1 << 0) re_order_header This option will cause the | ||
134 | * VLAN code to move around the ethernet header on | ||
135 | * ingress to make the skb look **exactly** like it | ||
136 | * came in from an ethernet port. This destroys some of | ||
137 | * the VLAN information in the skb, but it fixes programs | ||
138 | * like DHCP that use packet-filtering and don't understand | ||
139 | * 802.1Q | ||
140 | */ | ||
141 | struct net_device *real_dev; /* the underlying device/interface */ | ||
142 | unsigned char real_dev_addr[ETH_ALEN]; | ||
143 | struct proc_dir_entry *dent; /* Holds the proc data */ | ||
144 | unsigned long cnt_inc_headroom_on_tx; /* How many times did we have to grow the skb on TX. */ | ||
145 | unsigned long cnt_encap_on_xmit; /* How many times did we have to encapsulate the skb on TX. */ | ||
146 | }; | ||
147 | |||
148 | static inline struct vlan_dev_info *vlan_dev_info(const struct net_device *dev) | ||
149 | { | ||
150 | return netdev_priv(dev); | ||
151 | } | ||
152 | |||
153 | /* VLAN tx hw acceleration helpers. */ | 112 | /* VLAN tx hw acceleration helpers. */ |
154 | struct vlan_skb_tx_cookie { | 113 | struct vlan_skb_tx_cookie { |
155 | u32 magic; | 114 | u32 magic; |
@@ -163,9 +122,24 @@ struct vlan_skb_tx_cookie { | |||
163 | #define vlan_tx_tag_get(__skb) (VLAN_TX_SKB_CB(__skb)->vlan_tag) | 122 | #define vlan_tx_tag_get(__skb) (VLAN_TX_SKB_CB(__skb)->vlan_tag) |
164 | 123 | ||
165 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 124 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) |
125 | extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); | ||
126 | extern u16 vlan_dev_vlan_id(const struct net_device *dev); | ||
127 | |||
166 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 128 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
167 | unsigned short vlan_tag, int polling); | 129 | unsigned short vlan_tag, int polling); |
168 | #else | 130 | #else |
131 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) | ||
132 | { | ||
133 | BUG(); | ||
134 | return NULL; | ||
135 | } | ||
136 | |||
137 | static inline u16 vlan_dev_vlan_id(const struct net_device *dev) | ||
138 | { | ||
139 | BUG(); | ||
140 | return 0; | ||
141 | } | ||
142 | |||
169 | static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 143 | static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
170 | unsigned short vlan_tag, int polling) | 144 | unsigned short vlan_tag, int polling) |
171 | { | 145 | { |