From: Olof Johansson Date: Tue, 8 May 2007 05:48:02 +0000 (-0500) Subject: pasemi_mac: Use local-mac-address instead of mac-address if available X-Git-Tag: v2.6.22-rc1~355^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5fd22ebc71eecb7b61e542d34ac50a417b3031b;p=linux-2.6 pasemi_mac: Use local-mac-address instead of mac-address if available Use local-mac-address in the device tree instead. Fall back to mac-address for older firmware. Signed-off-by: Olof Johansson Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 78b127c404..b8f976bd60 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c @@ -94,7 +94,12 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) return -ENOENT; } - maddr = get_property(dn, "mac-address", NULL); + maddr = get_property(dn, "local-mac-address", NULL); + + /* Fall back to mac-address for older firmware */ + if (maddr == NULL) + maddr = get_property(dn, "mac-address", NULL); + if (maddr == NULL) { dev_warn(&pdev->dev, "no mac address in device tree, not configuring\n");