net: dsa: inherit addr_assign_type along with dev_addr
authorBjørn Mork <bjorn@mork.no>
Fri, 30 Aug 2013 16:08:46 +0000 (18:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2013 00:57:49 +0000 (20:57 -0400)
A device inheriting a random or set address should reflect this in
its addr_assign_type.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c

index 6ebd8fb..29d684e 100644 (file)
@@ -347,7 +347,7 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent,
 
        slave_dev->features = master->vlan_features;
        SET_ETHTOOL_OPS(slave_dev, &dsa_slave_ethtool_ops);
-       memcpy(slave_dev->dev_addr, master->dev_addr, ETH_ALEN);
+       eth_hw_addr_inherit(slave_dev, master);
        slave_dev->tx_queue_len = 0;
 
        switch (ds->dst->tag_protocol) {