Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24760
b: refs/heads/master
c: 391fc09
h: refs/heads/master
v: v3
  • Loading branch information
Gary Zambrano authored and Jeff Garzik committed Mar 29, 2006
1 parent 62e8dac commit 11329ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc0e1fc970279c539db1e94dd473acbb193ee473
refs/heads/master: 391fc09a143aac08d1a3dc37b60238612b504ad3
9 changes: 9 additions & 0 deletions trunk/drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,9 @@ static int b44_set_mac_addr(struct net_device *dev, void *p)
if (netif_running(dev))
return -EBUSY;

if (!is_valid_ether_addr(addr->sa_data))
return -EINVAL;

memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);

spin_lock_irq(&bp->lock);
Expand Down Expand Up @@ -1876,6 +1879,12 @@ static int __devinit b44_get_invariants(struct b44 *bp)
bp->dev->dev_addr[3] = eeprom[80];
bp->dev->dev_addr[4] = eeprom[83];
bp->dev->dev_addr[5] = eeprom[82];

if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
printk(KERN_ERR PFX "Invalid MAC address found in EEPROM\n");
return -EINVAL;
}

memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len);

bp->phy_addr = eeprom[90] & 0x1f;
Expand Down

0 comments on commit 11329ea

Please sign in to comment.