docs: use ETH_HWADDR_LEN, not sizeof(netif->hwaddr)

This commit is contained in:
Simon Goldschmidt 2018-06-07 20:48:18 +02:00
parent b1ffb3a8d3
commit ab922582dc

View File

@ -56,8 +56,8 @@ netif_init(struct netif *netif)
netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET | NETIF_FLAG_IGMP | NETIF_FLAG_MLD6;
MIB2_INIT_NETIF(netif, snmp_ifType_ethernet_csmacd, 100000000);
SMEMCPY(netif->hwaddr, your_mac_address_goes_here, sizeof(netif->hwaddr));
netif->hwaddr_len = sizeof(netif->hwaddr);
SMEMCPY(netif->hwaddr, your_mac_address_goes_here, ETH_HWADDR_LEN);
netif->hwaddr_len = ETH_HWADDR_LEN;
return ERR_OK;
}