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:
benpicco 2019-12-05 18:53:10 +01:00 committed by GitHub
commit b77ff84d9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -155,9 +155,7 @@ static void _fill_ethernet(usbus_cdcecm_device_t *cdcecm)
{
uint8_t ethernet[ETHERNET_ADDR_LEN];
luid_get(ethernet, ETHERNET_ADDR_LEN);
eui48_set_local((eui48_t*)ethernet);
eui48_clear_group((eui48_t*)ethernet);
luid_get_eui48((eui48_t*)ethernet);
fmt_bytes_hex(cdcecm->mac_host, ethernet, sizeof(ethernet));
}

View File

@ -145,9 +145,7 @@ static int _init(netdev_t *netdev)
{
usbus_cdcecm_device_t *cdcecm = _netdev_to_cdcecm(netdev);
luid_get(cdcecm->mac_netdev, ETHERNET_ADDR_LEN);
eui48_set_local((eui48_t*)cdcecm->mac_netdev);
eui48_clear_group((eui48_t*)cdcecm->mac_netdev);
luid_get_eui48((eui48_t*)cdcecm->mac_netdev);
return 0;
}