]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/macvlan.c
i40e: driver ethtool core
[karo-tx-linux.git] / drivers / net / macvlan.c
index 16b43bf544b74dd3ee72599f56f429ca2dea8851..64dfaa303dcc943f34286604b080cd657895cbc7 100644 (file)
@@ -600,6 +600,9 @@ static int macvlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
        if (!vlan->port->passthru)
                return -EOPNOTSUPP;
 
+       if (flags & NLM_F_REPLACE)
+               return -EOPNOTSUPP;
+
        if (is_unicast_ether_addr(addr))
                err = dev_uc_add_excl(dev, addr);
        else if (is_multicast_ether_addr(addr))
@@ -683,7 +686,7 @@ void macvlan_common_setup(struct net_device *dev)
        dev->priv_flags        |= IFF_UNICAST_FLT;
        dev->netdev_ops         = &macvlan_netdev_ops;
        dev->destructor         = free_netdev;
-       dev->header_ops         = &macvlan_hard_header_ops,
+       dev->header_ops         = &macvlan_hard_header_ops;
        dev->ethtool_ops        = &macvlan_ethtool_ops;
 }
 EXPORT_SYMBOL_GPL(macvlan_common_setup);
@@ -820,7 +823,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
                if (port->count)
                        return -EINVAL;
                port->passthru = true;
-               memcpy(dev->dev_addr, lowerdev->dev_addr, ETH_ALEN);
+               eth_hw_addr_inherit(dev, lowerdev);
        }
 
        err = netdev_upper_dev_link(lowerdev, dev);