From: Heinrich Schuchardt Date: Thu, 5 Oct 2017 14:35:58 +0000 (+0200) Subject: efi_loader: efi_net: hwaddr_size = 6 X-Git-Tag: v2017.11-rc2~55^2~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5d4a5ea964e523a29ec077b6f95537956c366c1f;p=u-boot efi_loader: efi_net: hwaddr_size = 6 The length of a MAC address is 6. We have to set this length in the EFI_SIMPLE_NETWORK_MODE structure of the EFI_SIMPLE_NETWORK_PROTOCOL. Without this patch iPXE fails to initialize the network with error message SNP MAC(001e0633bcbf,0x0) has invalid hardware address length 0 Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass Signed-off-by: Alexander Graf --- diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index fb23bcf633..9def34cf93 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -245,6 +245,7 @@ int efi_net_register(void) netobj->net.mode = &netobj->net_mode; netobj->net_mode.state = EFI_NETWORK_STARTED; memcpy(netobj->net_mode.current_address.mac_addr, eth_get_ethaddr(), 6); + netobj->net_mode.hwaddr_size = ARP_HLEN; netobj->net_mode.max_packet_size = PKTSIZE; netobj->pxe.mode = &netobj->pxe_mode;