summaryrefslogtreecommitdiff
path: root/board/keymile/common/ivm.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-01-10 16:38:40 -0500
committerTom Rini <trini@konsulko.com>2020-01-10 16:38:40 -0500
commitef2f0d323652c1162937df668b33b3bfe0ca3904 (patch)
treef957b7e9edcf79403f8a582d17dc4103f293fc10 /board/keymile/common/ivm.c
parentc00bd81ae0d6eb1f94e26b31be3a64cadaa05bcb (diff)
parent4f731c795d75aee548f6886f4f0da0a49a99354d (diff)
Merge branch '2020-01-10-master-imports'
- Android image support enhancements - Assorted ARM fixes and enhancements - m68k update
Diffstat (limited to 'board/keymile/common/ivm.c')
-rw-r--r--board/keymile/common/ivm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index 50df44d1c1..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_ADRESS_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_ADRESS_OFFSET, false);
+ process_mac(valbuf, page2, mac_address_offset, false);
env_set((char *)"ethaddr", (char *)valbuf);
- process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_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);
}