Hi Damien, On Tue, Jun 2, 2015 at 3:22 PM, Damien Riegel <damien.rie...@savoirfairelinux.com> wrote: > The TS-4800 doesn't have its MAC address fused, therefore the > fec_mxc driver can not currently fetch it. > > This commit adds the capability to fetch the MAC address from > environment if not found in fuses. > > Signed-off-by: Damien Riegel <damien.rie...@savoirfairelinux.com> > Cc: Stefano Babic <sba...@denx.de> > Cc: Joe Hershberger <joe.hershber...@ni.com> > --- > drivers/net/fec_mxc.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c > index 9225d37..a789ecc 100644 > --- a/drivers/net/fec_mxc.c > +++ b/drivers/net/fec_mxc.c > @@ -1040,6 +1040,10 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t > base_addr, > if (!getenv("ethaddr")) > eth_setenv_enetaddr("ethaddr", ethaddr); > } > + else if (eth_getenv_enetaddr("ethaddr", ethaddr)) { > + debug("got MAC%d address from env: %pM\n", dev_id, ethaddr); > + memcpy(edev->enetaddr, ethaddr, 6); > + }
This is not the appropriate way to handle this. The network stack should already be setting this for you. Line 696 in net/eth.c Is this attempting to fix a problem that you've observed? Thanks, -Joe _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot