Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127826
b: refs/heads/master
c: f52deb0
h: refs/heads/master
v: v3
  • Loading branch information
Wu Fengguang authored and David S. Miller committed Jan 8, 2009
1 parent 6dd9a10 commit 2ebeef9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b9f8ec6e5e98779e8b3806a5f58267378ef57eb
refs/heads/master: f52deb0e8408515ecf58c330c93fa99b8cb53cb4
11 changes: 9 additions & 2 deletions trunk/drivers/net/usb/dm9601.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,11 @@ static int dm9601_set_mac_address(struct net_device *net, void *p)
struct sockaddr *addr = p;
struct usbnet *dev = netdev_priv(net);

if (!is_valid_ether_addr(addr->sa_data))
if (!is_valid_ether_addr(addr->sa_data)) {
dev_err(&net->dev, "not setting invalid mac address %pM\n",
addr->sa_data);
return -EINVAL;
}

memcpy(net->dev_addr, addr->sa_data, net->addr_len);
__dm9601_set_mac_address(dev);
Expand Down Expand Up @@ -455,8 +458,12 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
*/
if (is_valid_ether_addr(mac))
memcpy(dev->net->dev_addr, mac, ETH_ALEN);
else
else {
printk(KERN_WARNING
"dm9601: No valid MAC address in EEPROM, using %pM\n",
dev->net->dev_addr);
__dm9601_set_mac_address(dev);
}

/* power up phy */
dm_write_reg(dev, DM_GPR_CTRL, 1);
Expand Down

0 comments on commit 2ebeef9

Please sign in to comment.