From: Mike Frysinger Date: Sat, 14 Feb 2009 02:22:51 -0500 Subject: [U-Boot] [PATCH 08/27] nvedit: do not update global bi_enetaddr and do not call eth_set_enetaddr() In-Reply-To: <1234596190-524-1-git-send-email-vapier@gentoo.org> References: <1234596190-524-1-git-send-email-vapier@gentoo.org> Message-ID: <1234596190-524-9-git-send-email-vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Since the ethernet layer handles updating of device addresses itself from the environment, there is no point in calling eth_set_enetaddr(). Signed-off-by: Mike Frysinger CC: Ben Warren --- common/cmd_nvedit.c | 24 +----------------------- 1 files changed, 1 insertions(+), 23 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 1fcb4c9..da69f9b 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -277,18 +277,6 @@ int _do_setenv (int flag, int argc, char *argv[]) *++env = '\0'; } -#ifdef CONFIG_NET_MULTI - if (strncmp(name, "eth", 3) == 0) { - char *end; - int num = simple_strtoul(name+3, &end, 10); - - if (strcmp(end, "addr") == 0) { - eth_set_enetaddr(num, argv[2]); - } - } -#endif - - /* Delete only ? */ if ((argc < 3) || argv[2] == NULL) { env_crc_update (); @@ -336,18 +324,8 @@ int _do_setenv (int flag, int argc, char *argv[]) * entry in the enviornment is changed */ - if (strcmp(argv[1],"ethaddr") == 0) { - char *s = argv[2]; /* always use only one arg */ - char *e; - for (i=0; i<6; ++i) { - bd->bi_enetaddr[i] = s ? simple_strtoul(s, &e, 16) : 0; - if (s) s = (*e) ? e+1 : e; - } -#ifdef CONFIG_NET_MULTI - eth_set_enetaddr(0, argv[2]); -#endif + if (strcmp(argv[1],"ethaddr") == 0) return 0; - } if (strcmp(argv[1],"ipaddr") == 0) { char *s = argv[2]; /* always use only one arg */ -- 1.6.1.3