From 50a47d0523e8efebe912bef539a77ffd42116451 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 4 Apr 2012 18:53:40 +0000 Subject: net: punt bd->bi_ip_addr This field gets read in one place (by "bdinfo"), and we can replace that with getenv("ipaddr"). After all, the bi_ip_addr field is kept up-to-date implicitly with the value of the ipaddr env var. Signed-off-by: Mike Frysinger Reviewed-by: Joe Hershberger --- board/esd/cpci405/cpci405.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'board') diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 41b5ba0..1441b10 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -730,12 +730,11 @@ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * Update whole ip-addr */ - bd->bi_ip_addr = ipaddr; sprintf(str, "%ld.%ld.%ld.%ld", - (bd->bi_ip_addr & 0xff000000) >> 24, - (bd->bi_ip_addr & 0x00ff0000) >> 16, - (bd->bi_ip_addr & 0x0000ff00) >> 8, - (bd->bi_ip_addr & 0x000000ff)); + (ipaddr & 0xff000000) >> 24, + (ipaddr & 0x00ff0000) >> 16, + (ipaddr & 0x0000ff00) >> 8, + (ipaddr & 0x000000ff)); setenv("ipaddr", str); printf("Updated ip_addr from bp_eeprom to %s!\n", str); } -- cgit v1.1