diff options
author | Andy Duan <fugang.duan@nxp.com> | 2017-04-10 11:44:34 (GMT) |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2017-05-18 09:23:31 (GMT) |
commit | f01e4e1e148b11b4021e241e3940c664bcd79b71 (patch) | |
tree | 326de0002b47a5a30067f6226ad2f9888fbd70f6 /drivers | |
parent | 27255fe82163c2459431e1a270338df3bf76e1ec (diff) | |
download | u-boot-f01e4e1e148b11b4021e241e3940c664bcd79b71.tar.xz |
net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse
Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(),
it should transfer fec->dev_id to get mac address from fuse.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/fec_mxc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index ac7afb5..d67a69b 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1086,8 +1086,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr, #endif eth_register(edev); - if (fec_get_hwaddr(dev_id, ethaddr) == 0) { - debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr); + if (fec_get_hwaddr(fec->dev_id, ethaddr) == 0) { + debug("got MAC%d address from fuse: %pM\n", fec->dev_id, ethaddr); memcpy(edev->enetaddr, ethaddr, 6); if (!getenv("ethaddr")) eth_setenv_enetaddr("ethaddr", ethaddr); |