diff options
Diffstat (limited to 'drivers/net/usb/dm9601.c')
-rw-r--r-- | drivers/net/usb/dm9601.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 907f98b1eefe..48d7d278631e 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c @@ -93,7 +93,8 @@ static int dm_write_reg(struct usbnet *dev, u8 reg, u8 value) value, reg, NULL, 0); } -static void dm_write_async(struct usbnet *dev, u8 reg, u16 length, void *data) +static void dm_write_async(struct usbnet *dev, u8 reg, u16 length, + const void *data) { usbnet_write_cmd_async(dev, DM_WRITE_REGS, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, @@ -331,7 +332,7 @@ static int dm9601_set_mac_address(struct net_device *net, void *p) return -EINVAL; } - memcpy(net->dev_addr, addr->sa_data, net->addr_len); + eth_hw_addr_set(net, addr->sa_data); __dm9601_set_mac_address(dev); return 0; @@ -391,7 +392,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) * Overwrite the auto-generated address only with good ones. */ if (is_valid_ether_addr(mac)) - memcpy(dev->net->dev_addr, mac, ETH_ALEN); + eth_hw_addr_set(dev->net, mac); else { printk(KERN_WARNING "dm9601: No valid MAC address in EEPROM, using %pM\n", |