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:
commit
3d4977cca1
@ -170,7 +170,6 @@ static void _init_buffer(void)
|
|||||||
|
|
||||||
int stm32_eth_init(void)
|
int stm32_eth_init(void)
|
||||||
{
|
{
|
||||||
char hwaddr[ETHERNET_ADDR_LEN];
|
|
||||||
/* enable APB2 clock */
|
/* enable APB2 clock */
|
||||||
RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;
|
RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN;
|
||||||
|
|
||||||
@ -226,8 +225,9 @@ int stm32_eth_init(void)
|
|||||||
stm32_eth_set_mac(eth_config.mac);
|
stm32_eth_set_mac(eth_config.mac);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
luid_get(hwaddr, ETHERNET_ADDR_LEN);
|
eui48_t hwaddr;
|
||||||
stm32_eth_set_mac(hwaddr);
|
luid_get_eui48(&hwaddr);
|
||||||
|
stm32_eth_set_mac((const char *)hwaddr.uint8);
|
||||||
}
|
}
|
||||||
|
|
||||||
_init_buffer();
|
_init_buffer();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user