summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2012-08-23 07:26:52 +0400
committerDavid S. Miller <davem@davemloft.net>2012-08-24 21:46:39 +0400
commit9b361c13ceeae872161175d39f4798ee345ed10c (patch)
tree47431fc1e7c22695ce8b0128d34b70af79a90f02 /include/linux
parent0c7517e9faa2f79afe95b47321f3cd08fe0145cd (diff)
downloadlinux-9b361c13ceeae872161175d39f4798ee345ed10c.tar.xz
vlan: add helper which can be called to see if device is used by vlan
also, remove unused vlan_info definition from header CC: Patrick McHardy <kaber@trash.net> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/if_vlan.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index a810987cb80e..e6ff12dd717b 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -74,8 +74,6 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
/* found in socket.c */
extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
-struct vlan_info;
-
static inline int is_vlan_dev(struct net_device *dev)
{
return dev->priv_flags & IFF_802_1Q_VLAN;
@@ -101,6 +99,8 @@ extern int vlan_vids_add_by_dev(struct net_device *dev,
const struct net_device *by_dev);
extern void vlan_vids_del_by_dev(struct net_device *dev,
const struct net_device *by_dev);
+
+extern bool vlan_uses_dev(const struct net_device *dev);
#else
static inline struct net_device *
__vlan_find_dev_deep(struct net_device *real_dev, u16 vlan_id)
@@ -151,6 +151,11 @@ static inline void vlan_vids_del_by_dev(struct net_device *dev,
const struct net_device *by_dev)
{
}
+
+static inline bool vlan_uses_dev(const struct net_device *dev)
+{
+ return false;
+}
#endif
/**