diff options
author | Andy Duan <fugang.duan@nxp.com> | 2017-04-10 19:44:34 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2017-04-18 15:59:45 +0200 |
commit | 7f874e2b85a1bbc0a98c538135ad8c658b1856e1 (patch) | |
tree | c82a0a70f5897f7c28d23f622ba9768e19896de7 /drivers/net | |
parent | 4f55bd1c0ba12a2309bef7db33b0d4802e927647 (diff) |
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/net')
-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 ac7afb5b35..d67a69b879 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); |