Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/stm32/eth: Use luid_get_eui48 to generate local, non group EUI #13232

Merged
merged 2 commits into from
Jan 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpu/stm32_common/periph/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down