[U-Boot] [PATCH] net/eth: fix a bug in on_ethaddr()
Gong Qianyu
Qianyu.Gong at freescale.com
Mon Aug 31 05:34:43 CEST 2015
The loop should check all ethenet devices, not only the first device,
to set each specified ethaddr, or it'll cause failure when we use other
devices.
Signed-off-by: Gong Qianyu <Qianyu.Gong at freescale.com>
diff --git a/net/eth.c b/net/eth.c
index d3ec8d6..e3ef80e 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -677,6 +677,7 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
memset(dev->enetaddr, 0, 6);
}
}
+ dev = dev->next;
} while (dev != eth_devices);
return 0;
--
2.1.0.27.g96db324
More information about the U-Boot
mailing list