Skip to content

Commit

Permalink
[POWERPC] bootwrapper: Only print MAC addresses when the node is actu…
Browse files Browse the repository at this point in the history
…ally present

Some firmwares (such as PlanetCore) only provide a base MAC address, and
expect the kernel to set certain bits to generate the addresses for the
other ports.  As such, MAC addresses are generated that may not correspond
to actual hardware.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Scott Wood authored and Paul Mackerras committed Sep 13, 2007
1 parent 21f3fe2 commit 96ebc3b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arch/powerpc/boot/devtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,14 @@ void __dt_fixup_mac_addresses(u32 startindex, ...)
devp = find_node_by_prop_value(NULL, "linux,network-index",
(void*)&index, sizeof(index));

printf("ENET%d: local-mac-address <-"
" %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
if (devp) {
printf("ENET%d: local-mac-address <-"
" %02x:%02x:%02x:%02x:%02x:%02x\n\r", index,
addr[0], addr[1], addr[2],
addr[3], addr[4], addr[5]);

if (devp)
setprop(devp, "local-mac-address", addr, 6);
}

index++;
}
Expand Down

0 comments on commit 96ebc3b

Please sign in to comment.