Message ID | 20171005143607.25955-9-xypron.glpk@gmx.de |
---|---|
State | Accepted |
Delegated to: | Alexander Graf |
Headers | show |
Series | efi_loader: Simple Network Protocol | expand |
On 5 October 2017 at 08:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote: > 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 <xypron.glpk@gmx.de> > --- > v2 > no change > --- > lib/efi_loader/efi_net.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Simon Glass <sjg@chromium.org>
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;
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 <xypron.glpk@gmx.de> --- v2 no change --- lib/efi_loader/efi_net.c | 1 + 1 file changed, 1 insertion(+)