diff options
author | Andy Duan <fugang.duan@nxp.com> | 2017-01-18 16:04:10 +0800 |
---|---|---|
committer | Andy Duan <fugang.duan@nxp.com> | 2017-01-19 14:21:18 +0800 |
commit | 7e4a55b068311d46d16e86e697d36f34a59bf47a (patch) | |
tree | df632fde4500d3accade2251df95610e91e04d57 | |
parent | e8447d649a631ec98120d84fab124ca29fbe39f0 (diff) | |
download | u-boot-imx-7e4a55b068311d46d16e86e697d36f34a59bf47a.zip u-boot-imx-7e4a55b068311d46d16e86e697d36f34a59bf47a.tar.gz u-boot-imx-7e4a55b068311d46d16e86e697d36f34a59bf47a.tar.bz2 |
MLK-13777 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>
-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 2d12c0b..8ea81f9 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1043,8 +1043,8 @@ static int fec_probe(bd_t *bd, int dev_id, uint32_t base_addr, #endif eth_register(edev); - if (fec_get_hwaddr(edev, dev_id, ethaddr) == 0) { - debug("got MAC%d address from fuse: %pM\n", dev_id, ethaddr); + if (fec_get_hwaddr(edev, 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); |