浏览代码

efi_net: return EFI_UNSUPPORTED where appropriate

U-Boot does not implement all functions of the simple network
protocol. The unimplemented functions return either of
EFI_SUCCESS and EFI_INVALID_PARAMETER.

The UEFI spec foresees to return EFI_UNSUPPORTED in these cases.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt 7 年之前
父节点
当前提交
61da678c39
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      lib/efi_loader/efi_net.c

+ 4 - 6
lib/efi_loader/efi_net.c

@@ -78,9 +78,7 @@ static efi_status_t EFIAPI efi_net_receive_filters(
 	EFI_ENTRY("%p, %x, %x, %x, %lx, %p", this, enable, disable,
 	EFI_ENTRY("%p, %x, %x, %x, %lx, %p", this, enable, disable,
 		  reset_mcast_filter, mcast_filter_count, mcast_filter);
 		  reset_mcast_filter, mcast_filter_count, mcast_filter);
 
 
-	/* XXX Do we care? */
-
-	return EFI_EXIT(EFI_SUCCESS);
+	return EFI_EXIT(EFI_UNSUPPORTED);
 }
 }
 
 
 static efi_status_t EFIAPI efi_net_station_address(
 static efi_status_t EFIAPI efi_net_station_address(
@@ -89,7 +87,7 @@ static efi_status_t EFIAPI efi_net_station_address(
 {
 {
 	EFI_ENTRY("%p, %x, %p", this, reset, new_mac);
 	EFI_ENTRY("%p, %x, %p", this, reset, new_mac);
 
 
-	return EFI_EXIT(EFI_INVALID_PARAMETER);
+	return EFI_EXIT(EFI_UNSUPPORTED);
 }
 }
 
 
 static efi_status_t EFIAPI efi_net_statistics(struct efi_simple_network *this,
 static efi_status_t EFIAPI efi_net_statistics(struct efi_simple_network *this,
@@ -98,7 +96,7 @@ static efi_status_t EFIAPI efi_net_statistics(struct efi_simple_network *this,
 {
 {
 	EFI_ENTRY("%p, %x, %p, %p", this, reset, stat_size, stat_table);
 	EFI_ENTRY("%p, %x, %p, %p", this, reset, stat_size, stat_table);
 
 
-	return EFI_EXIT(EFI_INVALID_PARAMETER);
+	return EFI_EXIT(EFI_UNSUPPORTED);
 }
 }
 
 
 static efi_status_t EFIAPI efi_net_mcastiptomac(struct efi_simple_network *this,
 static efi_status_t EFIAPI efi_net_mcastiptomac(struct efi_simple_network *this,
@@ -118,7 +116,7 @@ static efi_status_t EFIAPI efi_net_nvdata(struct efi_simple_network *this,
 	EFI_ENTRY("%p, %x, %lx, %lx, %p", this, read_write, offset, buffer_size,
 	EFI_ENTRY("%p, %x, %lx, %lx, %p", this, read_write, offset, buffer_size,
 		  buffer);
 		  buffer);
 
 
-	return EFI_EXIT(EFI_INVALID_PARAMETER);
+	return EFI_EXIT(EFI_UNSUPPORTED);
 }
 }
 
 
 static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this,
 static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this,