Skip to content

Commit

Permalink
Merge pull request RIOT-OS#12676 from ant9000/pr/usbus_cdc_ecm-mac_ho…
Browse files Browse the repository at this point in the history
…st-fix

USBUS CDC ECM: host and MCU mac addresses should differ
  • Loading branch information
benpicco authored Dec 5, 2019
2 parents a3706c1 + f7be559 commit b77ff84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions sys/usb/usbus/cdc/ecm/cdc_ecm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

}
Expand Down
4 changes: 1 addition & 3 deletions sys/usb/usbus/cdc/ecm/cdc_ecm_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b77ff84

Please sign in to comment.