Merge pull request #13232 from kfessel/master

cpu/stm32/eth: Use luid_get_eui48 to generate local, non group EUI
This commit is contained in:
Martine Lenders 2020-01-30 17:37:25 +01:00 committed by GitHub
commit 3d4977cca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,6 @@ static void _init_buffer(void)
int stm32_eth_init(void)
{
char hwaddr[ETHERNET_ADDR_LEN];
/* enable APB2 clock */
RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;
@ -226,8 +225,9 @@ int stm32_eth_init(void)
stm32_eth_set_mac(eth_config.mac);
}
else {
luid_get(hwaddr, ETHERNET_ADDR_LEN);
stm32_eth_set_mac(hwaddr);
eui48_t hwaddr;
luid_get_eui48(&hwaddr);
stm32_eth_set_mac((const char *)hwaddr.uint8);
}
_init_buffer();