Need to use the new 'saddr' variable not the void 'addr' in
set_mac_address().
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
static int set_mac_address(struct net_device *dev, void *addr)
{
- int i;
struct sockaddr *saddr = addr;
+ int i;
- if (!is_valid_ether_addr(addr->sa_data))
+ if (!is_valid_ether_addr(saddr->sa_data))
return -EADDRNOTAVAIL;
- memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+ memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN);
printk("%s: Setting MAC address to %pM\n", dev->name, dev->dev_addr);
/* set the Ethernet address */