diff --git a/stand/efi/include/efilib.h b/stand/efi/include/efilib.h index 96de2a6344a2..3d7d59d7f88b 100644 --- a/stand/efi/include/efilib.h +++ b/stand/efi/include/efilib.h @@ -105,6 +105,7 @@ bool efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); bool efi_devpath_same_disk(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); +bool efi_devpath_get_mac(EFI_DEVICE_PATH *, uint8_t[6]); EFI_DEVICE_PATH *efi_devpath_to_media_path(EFI_DEVICE_PATH *); UINTN efi_devpath_length(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_name_to_devpath(const char *path); diff --git a/stand/efi/libefi/efinet.c b/stand/efi/libefi/efinet.c index 18e437a9823a..89a27cbaa9f7 100644 --- a/stand/efi/libefi/efinet.c +++ b/stand/efi/libefi/efinet.c @@ -267,13 +267,10 @@ efi_pxe_snapshot(EFI_HANDLE h, struct pxe_cache_entry *pce) /* * Walk a device path looking for the first MSG_MAC_ADDR_DP node and - * copy its 6-byte Ethernet MAC into out. Returns true on success. - * Used to correlate a PXE Base Code Protocol handle back to an SNP - * unit when the two protocols live on different handles (typical for - * UEFI: PXE Base Code is installed on a child handle whose device - * path ends in Ipv4()/Ipv6(), extending the SNP's MAC-terminated path). + * copy its 6-byte Ethernet MAC into out. Returns true on success, + * e.g. false if dp has no NIC node at all. */ -static bool +bool efi_devpath_get_mac(EFI_DEVICE_PATH *dp, uint8_t out[6]) { MAC_ADDR_DEVICE_PATH *mac;