Skip to content

Commit

Permalink
r6040: warn about MAC address being unset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Jan 8, 2009
1 parent 84314bf commit 1d2b1a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1d2b1a7

Please sign in to comment.