aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/dm9601.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/dm9601.c')
-rw-r--r--drivers/net/usb/dm9601.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 63e97a387085..5b67bbf1987e 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -407,8 +407,11 @@ static int dm9601_set_mac_address(struct net_device *net, void *p)
407 struct sockaddr *addr = p; 407 struct sockaddr *addr = p;
408 struct usbnet *dev = netdev_priv(net); 408 struct usbnet *dev = netdev_priv(net);
409 409
410 if (!is_valid_ether_addr(addr->sa_data)) 410 if (!is_valid_ether_addr(addr->sa_data)) {
411 dev_err(&net->dev, "not setting invalid mac address %pM\n",
412 addr->sa_data);
411 return -EINVAL; 413 return -EINVAL;
414 }
412 415
413 memcpy(net->dev_addr, addr->sa_data, net->addr_len); 416 memcpy(net->dev_addr, addr->sa_data, net->addr_len);
414 __dm9601_set_mac_address(dev); 417 __dm9601_set_mac_address(dev);
@@ -455,8 +458,12 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
455 */ 458 */
456 if (is_valid_ether_addr(mac)) 459 if (is_valid_ether_addr(mac))
457 memcpy(dev->net->dev_addr, mac, ETH_ALEN); 460 memcpy(dev->net->dev_addr, mac, ETH_ALEN);
458 else 461 else {
462 printk(KERN_WARNING
463 "dm9601: No valid MAC address in EEPROM, using %pM\n",
464 dev->net->dev_addr);
459 __dm9601_set_mac_address(dev); 465 __dm9601_set_mac_address(dev);
466 }
460 467
461 /* power up phy */ 468 /* power up phy */
462 dm_write_reg(dev, DM_GPR_CTRL, 1); 469 dm_write_reg(dev, DM_GPR_CTRL, 1);