Merge pull request #12676 from ant9000/pr/usbus_cdc_ecm-mac_host-fix
USBUS CDC ECM: host and MCU mac addresses should differ
This commit is contained in:
commit
b77ff84d9e
@ -155,9 +155,7 @@ static void _fill_ethernet(usbus_cdcecm_device_t *cdcecm)
|
|||||||
{
|
{
|
||||||
uint8_t ethernet[ETHERNET_ADDR_LEN];
|
uint8_t ethernet[ETHERNET_ADDR_LEN];
|
||||||
|
|
||||||
luid_get(ethernet, ETHERNET_ADDR_LEN);
|
luid_get_eui48((eui48_t*)ethernet);
|
||||||
eui48_set_local((eui48_t*)ethernet);
|
|
||||||
eui48_clear_group((eui48_t*)ethernet);
|
|
||||||
fmt_bytes_hex(cdcecm->mac_host, ethernet, sizeof(ethernet));
|
fmt_bytes_hex(cdcecm->mac_host, ethernet, sizeof(ethernet));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,9 +145,7 @@ static int _init(netdev_t *netdev)
|
|||||||
{
|
{
|
||||||
usbus_cdcecm_device_t *cdcecm = _netdev_to_cdcecm(netdev);
|
usbus_cdcecm_device_t *cdcecm = _netdev_to_cdcecm(netdev);
|
||||||
|
|
||||||
luid_get(cdcecm->mac_netdev, ETHERNET_ADDR_LEN);
|
luid_get_eui48((eui48_t*)cdcecm->mac_netdev);
|
||||||
eui48_set_local((eui48_t*)cdcecm->mac_netdev);
|
|
||||||
eui48_clear_group((eui48_t*)cdcecm->mac_netdev);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user