summaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2012-08-23 03:26:52 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-24 13:46:39 -0400
commit9b361c13ceeae872161175d39f4798ee345ed10c (patch)
tree47431fc1e7c22695ce8b0128d34b70af79a90f02 /net/8021q
parent0c7517e9faa2f79afe95b47321f3cd08fe0145cd (diff)
downloadlinux-9b361c13ceeae872161175d39f4798ee345ed10c.tar.bz2
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 'net/8021q')
-rw-r--r--net/8021q/vlan_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 8ca533c95de0..b258da88f675 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -368,3 +368,9 @@ void vlan_vids_del_by_dev(struct net_device *dev,
vlan_vid_del(dev, vid_info->vid);
}
EXPORT_SYMBOL(vlan_vids_del_by_dev);
+
+bool vlan_uses_dev(const struct net_device *dev)
+{
+ return rtnl_dereference(dev->vlan_info) ? true : false;
+}
+EXPORT_SYMBOL(vlan_uses_dev);