Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96ebc3bf authored by Scott Wood's avatar Scott Wood Committed by Paul Mackerras
Browse files

[POWERPC] bootwrapper: Only print MAC addresses when the node is actually 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: default avatarScott Wood <scottwood@freescale.com>
Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 21f3fe2f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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));

		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]);
			       addr[0], addr[1], addr[2],
			       addr[3], addr[4], addr[5]);

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

		index++;
	}