瀏覽代碼

km/common: force set ethaddr after reading IVM

The ethaddr is stored inside the inventory eeprom. During
boottime this value was read out and the ethaddr variable was
set. Previously this was only done if it ethaddr == NULL but
this is wrong for our ARM boards. Because ethaddr is at this
stage never NULL for ARM due to the random calculation of a
MAC address in mvgbe.c.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
Holger Brunck 14 年之前
父節點
當前提交
e819582571
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      board/keymile/common/common.c

+ 1 - 2
board/keymile/common/common.c

@@ -278,8 +278,7 @@ static int ivm_analyze_block2(unsigned char *buf, int len)
 		sprintf((char *)valbuf, "%pM", buf);
 	}
 #endif
-	if (getenv("ethaddr") == NULL)
-		setenv((char *)"ethaddr", (char *)valbuf);
+	setenv((char *)"ethaddr", (char *)valbuf);
 
 	/* IVM_MacCount */
 	count = (buf[10] << 24) +