diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-06-04 16:53:02 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-06-04 16:53:02 -0400 |
commit | f8647b506d7116a1a3accd8d618184096e85f50b (patch) | |
tree | f10bc7201fda2a36c035548a0ea62210ad57adb6 /include/linux/if_vlan.h | |
parent | 1d421ca9d7edbac1eb118631ee039d50ab54771e (diff) | |
parent | f7a89f1b8eb598ac5da61c9795b3d847baa73d12 (diff) |
Merge branch '3.15-fixes' into mips-for-linux-next
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r-- | include/linux/if_vlan.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 13bbbde00e68..b2acc4a1b13c 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -73,7 +73,7 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) | |||
73 | /* found in socket.c */ | 73 | /* found in socket.c */ |
74 | extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); | 74 | extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); |
75 | 75 | ||
76 | static inline int is_vlan_dev(struct net_device *dev) | 76 | static inline bool is_vlan_dev(struct net_device *dev) |
77 | { | 77 | { |
78 | return dev->priv_flags & IFF_802_1Q_VLAN; | 78 | return dev->priv_flags & IFF_802_1Q_VLAN; |
79 | } | 79 | } |
@@ -159,6 +159,7 @@ struct vlan_dev_priv { | |||
159 | #ifdef CONFIG_NET_POLL_CONTROLLER | 159 | #ifdef CONFIG_NET_POLL_CONTROLLER |
160 | struct netpoll *netpoll; | 160 | struct netpoll *netpoll; |
161 | #endif | 161 | #endif |
162 | unsigned int nest_level; | ||
162 | }; | 163 | }; |
163 | 164 | ||
164 | static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev) | 165 | static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev) |
@@ -197,6 +198,12 @@ extern void vlan_vids_del_by_dev(struct net_device *dev, | |||
197 | const struct net_device *by_dev); | 198 | const struct net_device *by_dev); |
198 | 199 | ||
199 | extern bool vlan_uses_dev(const struct net_device *dev); | 200 | extern bool vlan_uses_dev(const struct net_device *dev); |
201 | |||
202 | static inline int vlan_get_encap_level(struct net_device *dev) | ||
203 | { | ||
204 | BUG_ON(!is_vlan_dev(dev)); | ||
205 | return vlan_dev_priv(dev)->nest_level; | ||
206 | } | ||
200 | #else | 207 | #else |
201 | static inline struct net_device * | 208 | static inline struct net_device * |
202 | __vlan_find_dev_deep(struct net_device *real_dev, | 209 | __vlan_find_dev_deep(struct net_device *real_dev, |
@@ -263,6 +270,11 @@ static inline bool vlan_uses_dev(const struct net_device *dev) | |||
263 | { | 270 | { |
264 | return false; | 271 | return false; |
265 | } | 272 | } |
273 | static inline int vlan_get_encap_level(struct net_device *dev) | ||
274 | { | ||
275 | BUG(); | ||
276 | return 0; | ||
277 | } | ||
266 | #endif | 278 | #endif |
267 | 279 | ||
268 | static inline bool vlan_hw_offload_capable(netdev_features_t features, | 280 | static inline bool vlan_hw_offload_capable(netdev_features_t features, |
@@ -483,4 +495,5 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb, | |||
483 | */ | 495 | */ |
484 | skb->protocol = htons(ETH_P_802_2); | 496 | skb->protocol = htons(ETH_P_802_2); |
485 | } | 497 | } |
498 | |||
486 | #endif /* !(_LINUX_IF_VLAN_H_) */ | 499 | #endif /* !(_LINUX_IF_VLAN_H_) */ |