mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 12:01:31 +00:00
nvedit: do not update global bi_enetaddr and do not call eth_set_enetaddr()
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 <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
5013533467
commit
56b555a644
1 changed files with 1 additions and 23 deletions
|
@ -283,18 +283,6 @@ int _do_setenv (int flag, int argc, char *argv[])
|
||||||
*++env = '\0';
|
*++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 ? */
|
/* Delete only ? */
|
||||||
if ((argc < 3) || argv[2] == NULL) {
|
if ((argc < 3) || argv[2] == NULL) {
|
||||||
env_crc_update ();
|
env_crc_update ();
|
||||||
|
@ -342,18 +330,8 @@ int _do_setenv (int flag, int argc, char *argv[])
|
||||||
* entry in the enviornment is changed
|
* entry in the enviornment is changed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (strcmp(argv[1],"ethaddr") == 0) {
|
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
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp(argv[1],"ipaddr") == 0) {
|
if (strcmp(argv[1],"ipaddr") == 0) {
|
||||||
char *s = argv[2]; /* always use only one arg */
|
char *s = argv[2]; /* always use only one arg */
|
||||||
|
|
Loading…
Add table
Reference in a new issue