diff options
author | Jiri Pirko <jiri@resnulli.us> | 2012-08-23 05:26:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-24 19:46:39 +0200 |
commit | 9b361c13ceeae872161175d39f4798ee345ed10c (patch) | |
tree | 47431fc1e7c22695ce8b0128d34b70af79a90f02 /net/8021q | |
parent | team: don't print warn message on -ESRCH during event send (diff) | |
download | linux-9b361c13ceeae872161175d39f4798ee345ed10c.tar.xz linux-9b361c13ceeae872161175d39f4798ee345ed10c.zip |
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.c | 6 |
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); |