diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2017-10-05 16:36:03 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2017-10-09 07:00:34 +0200 |
commit | 8db174d651e3f92ddb9660f1f8b8755b902c3c11 (patch) | |
tree | 5bbe48664654c051a1f596779fc78c1be33b668c /lib | |
parent | 891b3d9051690d0ba39da4eda1d15773ebfee2b6 (diff) | |
download | u-boot-8db174d651e3f92ddb9660f1f8b8755b902c3c11.tar.gz |
efi_loader: size fields in SimpleNetworkProtocol
The size fields in the Simple Network Protocol are all
UINTN in the UEFI spec. So use size_t.
Provide a function description of the receive function.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_net.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index b16463ba1a..4546b43603 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -150,12 +150,13 @@ static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this, } static efi_status_t EFIAPI efi_net_transmit(struct efi_simple_network *this, - ulong header_size, ulong buffer_size, void *buffer, + size_t header_size, size_t buffer_size, void *buffer, struct efi_mac_address *src_addr, struct efi_mac_address *dest_addr, u16 *protocol) { - EFI_ENTRY("%p, %lx, %lx, %p, %p, %p, %p", this, header_size, - buffer_size, buffer, src_addr, dest_addr, protocol); + EFI_ENTRY("%p, %lu, %lu, %p, %p, %p, %p", this, + (unsigned long)header_size, (unsigned long)buffer_size, + buffer, src_addr, dest_addr, protocol); efi_timer_check(); @@ -183,8 +184,23 @@ static void efi_net_push(void *pkt, int len) wait_for_packet->is_signaled = true; } +/* + * Receive a packet from a network interface. + * + * This function implements the Receive service of the Simple Network Protocol. + * See the UEFI spec for details. + * + * @this the instance of the Simple Network Protocol + * @header_size size of the media header + * @buffer_size size of the buffer to receive the packet + * @buffer buffer to receive the packet + * @src_addr source MAC address + * @dest_addr destination MAC address + * @protocol protocol + * @return status code + */ static efi_status_t EFIAPI efi_net_receive(struct efi_simple_network *this, - ulong *header_size, ulong *buffer_size, void *buffer, + size_t *header_size, size_t *buffer_size, void *buffer, struct efi_mac_address *src_addr, struct efi_mac_address *dest_addr, u16 *protocol) { |