r6040: warn about MAC address being unset
authorFlorian Fainelli <florian@openwrt.org>
Thu, 8 Jan 2009 19:02:30 +0000 (11:02 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jan 2009 19:02:30 +0000 (11:02 -0800)
Some bootloader/BIOSes do not set the MAC
address, warn about that.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/r6040.c

index 7ac6fede6e6dd13c6ec50e7cfa3722f16f1a0d6e..3354cceb75d21a157a5d6717ca3ee98f8a17947a 100644 (file)
@@ -1141,6 +1141,11 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
        adrp[1] = ioread16(ioaddr + MID_0M);
        adrp[2] = ioread16(ioaddr + MID_0H);
 
+       /* Some bootloader/BIOSes do not initialize
+        * MAC address, warn about that */
+       if (!(adrp[0] || adrp[1] || adrp[2]))
+               printk(KERN_WARNING DRV_NAME ": MAC address not initialized\n");
+
        /* Link new device into r6040_root_dev */
        lp->pdev = pdev;
        lp->dev = dev;