/* Store the new hardware address in dev->dev_addr, and update the MAC.  */
static int set_mac_address(struct net_device *dev, void *addr)
/* Store the new hardware address in dev->dev_addr, and update the MAC.  */
static int set_mac_address(struct net_device *dev, void *addr)
{
	struct sockaddr *address = addr;
	if (!is_valid_ether_addr(address->sa_data))
		return -EADDRNOTAVAIL;
	memcpy(dev->dev_addr, address->sa_data, dev->addr_len);
	update_mac_address(dev);
	printk("%s: Setting MAC address to %pM\n", dev->name,
	       dev->dev_addr);
	return 0;
}