mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-01 08:06:50 +07:00
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>
This commit is contained in:
parent
a1b7f85e4f
commit
e3cb78c772
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user