From 58e1fdb051c469049d8ed8b31f229470de4d0562 Mon Sep 17 00:00:00 2001 From: Holger Brunck Date: Mon, 25 Nov 2019 17:24:13 +0100 Subject: km/boards: fix typo for MAC address offset config option This patch only fixes a typo. Signed-off-by: Holger Brunck CC: Stefan Roese CC: Valentin Longchamp Reviewed-by: Stefan Roese --- board/keymile/common/ivm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board/keymile/common/ivm.c') diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index 50df44d1c1..429e9c7914 100644 --- a/board/keymile/common/ivm.c +++ b/board/keymile/common/ivm.c @@ -309,16 +309,16 @@ static int ivm_populate_env(unsigned char *buf, int len) #ifndef CONFIG_KMTEGR1 /* if an offset is defined, add it */ - process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET, true); + process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADDRESS_OFFSET, true); env_set((char *)"ethaddr", (char *)valbuf); #else /* KMTEGR1 has a special setup. eth0 has no connection to the outside and * gets an locally administred MAC address, eth1 is the debug interface and * gets the official MAC address from the IVM */ - process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET, false); + process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADDRESS_OFFSET, false); env_set((char *)"ethaddr", (char *)valbuf); - process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET, true); + process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADDRESS_OFFSET, true); env_set((char *)"eth1addr", (char *)valbuf); #endif -- cgit From fd7c400962dd905611d5d3453a02fd4707da10fb Mon Sep 17 00:00:00 2001 From: Holger Brunck Date: Mon, 25 Nov 2019 17:24:14 +0100 Subject: km/boards: add MAC address offset as argument to ivm_populate_env For upcoming SECU board we have different MAC address offsets depending on which functional unit we are running. In this case we need to pass this value to the ivm_populate_env function instead of using the hard coded config option there. Signed-off-by: Holger Brunck CC: Stefan Roese CC: Valentin Longchamp CC: Marek Vasut Reviewed-by: Stefan Roese --- board/keymile/common/ivm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'board/keymile/common/ivm.c') diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index 429e9c7914..fee7f03c8c 100644 --- a/board/keymile/common/ivm.c +++ b/board/keymile/common/ivm.c @@ -297,7 +297,7 @@ int ivm_analyze_eeprom(unsigned char *buf, int len) return 0; } -static int ivm_populate_env(unsigned char *buf, int len) +static int ivm_populate_env(unsigned char *buf, int len, int mac_address_offset) { unsigned char *page2; unsigned char valbuf[MAC_STR_SZ]; @@ -309,23 +309,23 @@ static int ivm_populate_env(unsigned char *buf, int len) #ifndef CONFIG_KMTEGR1 /* if an offset is defined, add it */ - process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADDRESS_OFFSET, true); + process_mac(valbuf, page2, mac_address_offset, true); env_set((char *)"ethaddr", (char *)valbuf); #else /* KMTEGR1 has a special setup. eth0 has no connection to the outside and * gets an locally administred MAC address, eth1 is the debug interface and * gets the official MAC address from the IVM */ - process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADDRESS_OFFSET, false); + process_mac(valbuf, page2, mac_address_offset, false); env_set((char *)"ethaddr", (char *)valbuf); - process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADDRESS_OFFSET, true); + process_mac(valbuf, page2, mac_address_offset, true); env_set((char *)"eth1addr", (char *)valbuf); #endif return 0; } -int ivm_read_eeprom(unsigned char *buf, int len) +int ivm_read_eeprom(unsigned char *buf, int len, int mac_address_offset) { int ret; @@ -339,5 +339,5 @@ int ivm_read_eeprom(unsigned char *buf, int len) return -2; } - return ivm_populate_env(buf, len); + return ivm_populate_env(buf, len, mac_address_offset); } -- cgit