]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/if_vlan.h
net: vlan: prepare for 802.1ad support
[karo-tx-linux.git] / include / linux / if_vlan.h
index 218a3b686d90600f313d1e423a752b9cc36a9dad..2c9fb65f826709880d47a3339686612c66c4779f 100644 (file)
@@ -86,15 +86,15 @@ static inline int is_vlan_dev(struct net_device *dev)
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 
 extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev,
-                                              u16 vlan_id);
+                                              __be16 vlan_proto, u16 vlan_id);
 extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
 extern u16 vlan_dev_vlan_id(const struct net_device *dev);
 
 extern bool vlan_do_receive(struct sk_buff **skb);
 extern struct sk_buff *vlan_untag(struct sk_buff *skb);
 
-extern int vlan_vid_add(struct net_device *dev, unsigned short vid);
-extern void vlan_vid_del(struct net_device *dev, unsigned short vid);
+extern int vlan_vid_add(struct net_device *dev, __be16 proto, u16 vid);
+extern void vlan_vid_del(struct net_device *dev, __be16 proto, u16 vid);
 
 extern int vlan_vids_add_by_dev(struct net_device *dev,
                                const struct net_device *by_dev);
@@ -238,7 +238,7 @@ static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
  */
 static inline struct sk_buff *vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
 {
-       if (skb->dev->features & NETIF_F_HW_VLAN_TX) {
+       if (skb->dev->features & NETIF_F_HW_VLAN_CTAG_TX) {
                return __vlan_hwaccel_put_tag(skb, vlan_tci);
        } else {
                return __vlan_put_tag(skb, vlan_tci);
@@ -294,7 +294,7 @@ static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb,
  */
 static inline int vlan_get_tag(const struct sk_buff *skb, u16 *vlan_tci)
 {
-       if (skb->dev->features & NETIF_F_HW_VLAN_TX) {
+       if (skb->dev->features & NETIF_F_HW_VLAN_CTAG_TX) {
                return __vlan_hwaccel_get_tag(skb, vlan_tci);
        } else {
                return __vlan_get_tag(skb, vlan_tci);
@@ -339,7 +339,7 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb,
         */
 
        proto = vhdr->h_vlan_encapsulated_proto;
-       if (ntohs(proto) >= 1536) {
+       if (ntohs(proto) >= ETH_P_802_3_MIN) {
                skb->protocol = proto;
                return;
        }