diff --git a/linux-2.6.35.11/drivers/net/via-rhine.c b/via-rhine.c index 4930f9d..4c1b9e7 100644 --- a/linux-2.6.35.11/drivers/net/via-rhine.c +++ b/via-rhine.c @@ -762,13 +762,16 @@ static int __devinit rhine_init_one(struct pci_dev *pdev, for (i = 0; i < 6; i++) dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i); - memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); - if (!is_valid_ether_addr(dev->perm_addr)) { - rc = -EIO; - printk(KERN_ERR "Invalid MAC address\n"); - goto err_out_unmap; + if (!is_valid_ether_addr(dev->dev_addr)) { + printk(KERN_ERR "via-rhine: Invalid MAC address: %pM. \n", + dev->dev_addr); + /* The device may still be used normally if a valid MAC is configured */ + random_ether_addr(dev->dev_addr); + printk(KERN_ERR "via-rhine: Using randomly generated address: %pM instead. \n", + dev->dev_addr); } + memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); /* For Rhine-I/II, phy_id is loaded from EEPROM */ if (!phy_id)