diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2016-06-02 12:02:04 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-03 19:40:05 -0400 |
commit | cb2911fed61497e4d0383355f1c865fcdaa94061 (patch) | |
tree | 03e81c6785930c522848dc4bb9b8e1da501e497b /drivers/net/hyperv | |
parent | db54275dffb28b0b19596a6418419930f58332a0 (diff) | |
download | linux-cb2911fed61497e4d0383355f1c865fcdaa94061.tar.gz linux-cb2911fed61497e4d0383355f1c865fcdaa94061.tar.bz2 linux-cb2911fed61497e4d0383355f1c865fcdaa94061.zip |
hv_netvsc: Fix VF register on vlan devices
Added a condition to avoid vlan devices with same MAC registering
as VF.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 6a69b5cc9fe2..5ac1267b393f 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1500,6 +1500,10 @@ static int netvsc_netdev_event(struct notifier_block *this, { struct net_device *event_dev = netdev_notifier_info_to_dev(ptr); + /* Avoid Vlan dev with same MAC registering as VF */ + if (event_dev->priv_flags & IFF_802_1Q_VLAN) + return NOTIFY_DONE; + switch (event) { case NETDEV_REGISTER: return netvsc_register_vf(event_dev); |