Skip to content

Commit

Permalink
vlan: don't call ndo_vlan_rx_register on hardware that doesn't have v…
Browse files Browse the repository at this point in the history
…lan 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>
  • Loading branch information
Antoine Reversat authored and David S. Miller committed Jun 17, 2011
1 parent a1b7f85 commit e3cb78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e3cb78c

Please sign in to comment.