Commit e3cb78c7 authored by Antoine Reversat's avatar Antoine Reversat Committed by David S. Miller

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: default avatarAntoine Reversat <a.reversat@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@conan.davemloft.net>
parent a1b7f85e
...@@ -205,7 +205,7 @@ int register_vlan_dev(struct net_device *dev) ...@@ -205,7 +205,7 @@ int register_vlan_dev(struct net_device *dev)
grp->nr_vlans++; grp->nr_vlans++;
if (ngrp) { 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); ops->ndo_vlan_rx_register(real_dev, ngrp);
rcu_assign_pointer(real_dev->vlgrp, ngrp); rcu_assign_pointer(real_dev->vlgrp, ngrp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment