diff options
Diffstat (limited to 'arch/xtensa/platforms')
-rw-r--r-- | arch/xtensa/platforms/iss/network.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c index 4986226a5ab2..962e5e145209 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c @@ -124,7 +124,7 @@ static char *split_if_spec(char *str, ...) static void setup_etheraddr(struct net_device *dev, char *str) { - unsigned char *addr = dev->dev_addr; + u8 addr[ETH_ALEN]; if (str == NULL) goto random; @@ -147,6 +147,7 @@ static void setup_etheraddr(struct net_device *dev, char *str) if (!is_local_ether_addr(addr)) pr_warn("%s: assigning a globally valid ethernet address\n", dev->name); + eth_hw_addr_set(dev, addr); return; random: @@ -467,7 +468,7 @@ static int iss_net_set_mac(struct net_device *dev, void *addr) if (!is_valid_ether_addr(hwaddr->sa_data)) return -EADDRNOTAVAIL; spin_lock_bh(&lp->lock); - memcpy(dev->dev_addr, hwaddr->sa_data, ETH_ALEN); + eth_hw_addr_set(dev, hwaddr->sa_data); spin_unlock_bh(&lp->lock); return 0; } |