summaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-11 18:23:48 -0500
committerWolfgang Denk <wd@denx.de>2009-03-20 22:39:09 +0100
commit95823ca0773356860e622ee3304a4b7cafcbf19a (patch)
tree5e983fbf257efdff153278feff36e151a4cc45bf /net/bootp.c
parent500b6c51e4c41f4562cb48344af98deb7e342731 (diff)
downloadu-boot-imx-95823ca0773356860e622ee3304a4b7cafcbf19a.zip
u-boot-imx-95823ca0773356860e622ee3304a4b7cafcbf19a.tar.gz
u-boot-imx-95823ca0773356860e622ee3304a4b7cafcbf19a.tar.bz2
net: get mac address from environment and use eth util funcs
Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/net/bootp.c b/net/bootp.c
index d1cbd39..3dea70aa 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -573,21 +573,12 @@ BootpRequest (void)
#ifdef CONFIG_BOOTP_RANDOM_DELAY /* Random BOOTP delay */
unsigned char bi_enetaddr[6];
int reg;
- char *e,*s;
- char tmp[64];
ulong tst1, tst2, sum, m_mask, m_value = 0;
if (BootpTry ==0) {
/* get our mac */
- reg = getenv_r ("ethaddr", tmp, sizeof(tmp));
- s = (reg > 0) ? tmp : NULL;
+ eth_getenv_enetaddr("ethaddr", bi_enetaddr);
- for (reg=0; reg<6; ++reg) {
- bi_enetaddr[reg] = s ? simple_strtoul(s, &e, 16) : 0;
- if (s) {
- s = (*e) ? e+1 : e;
- }
- }
#ifdef DEBUG
puts ("BootpRequest => Our Mac: ");
for (reg=0; reg<6; reg++) {