From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heinrich Schuchardt Date: Sun, 27 Aug 2017 00:53:26 +0200 Subject: [U-Boot] [PATCH 17/23] efi_loader: efi_net: hwaddr_size = 6 In-Reply-To: <20170826225328.7550-1-xypron.glpk@gmx.de> References: <20170826225110.7381-1-xypron.glpk@gmx.de> <20170826225328.7550-1-xypron.glpk@gmx.de> Message-ID: <20170826225328.7550-8-xypron.glpk@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- lib/efi_loader/efi_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index 0b949d86e8..75d7974b0e 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -259,6 +259,7 @@ int efi_net_register(void **handle) netobj->dp_end = dp_end; memcpy(netobj->dp_mac.mac.addr, eth_get_ethaddr(), 6); memcpy(netobj->net_mode.current_address.mac_addr, eth_get_ethaddr(), 6); + netobj->net_mode.hwaddr_size = 6; netobj->net_mode.max_packet_size = PKTSIZE; netobj->pxe.mode = &netobj->pxe_mode; -- 2.14.1