summaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan.c
diff options
context:
space:
mode:
authorAntoine Reversat <a.reversat@gmail.com>2011-06-16 10:47:13 +0000
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-17 00:12:51 -0400
commite3cb78c772de593afa720687ce3abbed8d93b0c3 (patch)
treef3dd770ba7325757d6a4c580e04106a9a57c8e0e /net/8021q/vlan.c
parenta1b7f85e4f632f9cc342d8a34a3903feaf47a261 (diff)
downloadlinux-e3cb78c772de593afa720687ce3abbed8d93b0c3.tar.gz
linux-e3cb78c772de593afa720687ce3abbed8d93b0c3.tar.bz2
linux-e3cb78c772de593afa720687ce3abbed8d93b0c3.zip
vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support
This patch removes the call to ndo_vlan_rx_register if the underlying device doesn't have hardware support for VLAN. Signed-off-by: Antoine Reversat <a.reversat@gmail.com> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r--net/8021q/vlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index c7a581a96894..917ecb93ea28 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -205,7 +205,7 @@ int register_vlan_dev(struct net_device *dev)
grp->nr_vlans++;
if (ngrp) {
- if (ops->ndo_vlan_rx_register)
+ if (ops->ndo_vlan_rx_register && (real_dev->features & NETIF_F_HW_VLAN_RX))
ops->ndo_vlan_rx_register(real_dev, ngrp);
rcu_assign_pointer(real_dev->vlgrp, ngrp);
}