aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/b44.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/b44.c')
-rw-r--r--drivers/net/b44.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index c3267e4e1bb0..15032f2c7817 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1339,6 +1339,9 @@ static int b44_set_mac_addr(struct net_device *dev, void *p)
1339 if (netif_running(dev)) 1339 if (netif_running(dev))
1340 return -EBUSY; 1340 return -EBUSY;
1341 1341
1342 if (!is_valid_ether_addr(addr->sa_data))
1343 return -EINVAL;
1344
1342 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); 1345 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
1343 1346
1344 spin_lock_irq(&bp->lock); 1347 spin_lock_irq(&bp->lock);
@@ -1876,6 +1879,12 @@ static int __devinit b44_get_invariants(struct b44 *bp)
1876 bp->dev->dev_addr[3] = eeprom[80]; 1879 bp->dev->dev_addr[3] = eeprom[80];
1877 bp->dev->dev_addr[4] = eeprom[83]; 1880 bp->dev->dev_addr[4] = eeprom[83];
1878 bp->dev->dev_addr[5] = eeprom[82]; 1881 bp->dev->dev_addr[5] = eeprom[82];
1882
1883 if (!is_valid_ether_addr(&bp->dev->dev_addr[0])){
1884 printk(KERN_ERR PFX "Invalid MAC address found in EEPROM\n");
1885 return -EINVAL;
1886 }
1887
1879 memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len); 1888 memcpy(bp->dev->perm_addr, bp->dev->dev_addr, bp->dev->addr_len);
1880 1889
1881 bp->phy_addr = eeprom[90] & 0x1f; 1890 bp->phy_addr = eeprom[90] & 0x1f;
@@ -2033,6 +2042,11 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2033 2042
2034 pci_save_state(bp->pdev); 2043 pci_save_state(bp->pdev);
2035 2044
2045 /* Chip reset provides power to the b44 MAC & PCI cores, which
2046 * is necessary for MAC register access.
2047 */
2048 b44_chip_reset(bp);
2049
2036 printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name); 2050 printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name);
2037 for (i = 0; i < 6; i++) 2051 for (i = 0; i < 6; i++)
2038 printk("%2.2x%c", dev->dev_addr[i], 2052 printk("%2.2x%c", dev->dev_addr[i],