Skip to content

Commit

Permalink
pasemi_mac: Use local-mac-address instead of mac-address if available
Browse files Browse the repository at this point in the history
Use local-mac-address in the device tree instead. Fall back to mac-address
for older firmware.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Olof Johansson authored and Jeff Garzik committed May 8, 2007
1 parent bb6e959 commit a5fd22e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/pasemi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit a5fd22e

Please sign in to comment.