summaryrefslogtreecommitdiff
path: root/drivers/net/e1000.c
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-11-03 04:24:41 -0800
committerJoe Hershberger <joe.hershberger@ni.com>2015-12-21 19:56:17 -0600
commitbc393a7954f741aeeb6da5a3161fe0961fa10be5 (patch)
tree411a09882364fcb4b7489ff8eaad554baafda61e /drivers/net/e1000.c
parent52d825cc7b9d50f286cdbd026733bb15e81d3c66 (diff)
fdt: Rewrite the logic in fdt_fixup_ethernet()
Currently in fdt_fixup_ethernet() the MAC address fix up is handled in a loop of which the exit condition is to test the "eth%daddr" env is not NULL. However this creates unnecessary constrains that those "eth%daddr" env variables must be sequential even if "ethernet%d" does not start from 0 in the "/aliases" node. For example, with "/aliases" node below: aliases { ethernet3 = &enet3; ethernet4 = &enet4; }; "ethaddr", "eth1addr", "eth2addr" must exist in order to fix up ethernet3's MAC address successfully. Now we change the loop logic to iterate the properties in the "/aliases" node. For each property, test if it is in a format of "ethernet%d", then get its MAC address from corresponding "eth%daddr" env and fix it up in the dtb. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com> On OMAP4 Panda (+v4.3 kernel) Tested-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/net/e1000.c')
0 files changed, 0 insertions, 0 deletions