aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/if_vlan.h7
-rw-r--r--net/8021q/vlan_core.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index d3d2306f00bf..13bbbde00e68 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -110,6 +110,7 @@ extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev,
110 __be16 vlan_proto, u16 vlan_id); 110 __be16 vlan_proto, u16 vlan_id);
111extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); 111extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
112extern u16 vlan_dev_vlan_id(const struct net_device *dev); 112extern u16 vlan_dev_vlan_id(const struct net_device *dev);
113extern __be16 vlan_dev_vlan_proto(const struct net_device *dev);
113 114
114/** 115/**
115 * struct vlan_priority_tci_mapping - vlan egress priority mappings 116 * struct vlan_priority_tci_mapping - vlan egress priority mappings
@@ -216,6 +217,12 @@ static inline u16 vlan_dev_vlan_id(const struct net_device *dev)
216 return 0; 217 return 0;
217} 218}
218 219
220static inline __be16 vlan_dev_vlan_proto(const struct net_device *dev)
221{
222 BUG();
223 return 0;
224}
225
219static inline u16 vlan_dev_get_egress_qos_mask(struct net_device *dev, 226static inline u16 vlan_dev_get_egress_qos_mask(struct net_device *dev,
220 u32 skprio) 227 u32 skprio)
221{ 228{
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 35b3c192d7b9..3c32bd257b73 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -106,6 +106,12 @@ u16 vlan_dev_vlan_id(const struct net_device *dev)
106} 106}
107EXPORT_SYMBOL(vlan_dev_vlan_id); 107EXPORT_SYMBOL(vlan_dev_vlan_id);
108 108
109__be16 vlan_dev_vlan_proto(const struct net_device *dev)
110{
111 return vlan_dev_priv(dev)->vlan_proto;
112}
113EXPORT_SYMBOL(vlan_dev_vlan_proto);
114
109static struct sk_buff *vlan_reorder_header(struct sk_buff *skb) 115static struct sk_buff *vlan_reorder_header(struct sk_buff *skb)
110{ 116{
111 if (skb_cow(skb, skb_headroom(skb)) < 0) 117 if (skb_cow(skb, skb_headroom(skb)) < 0)