diff mbox series

[U-Boot,v2,07/17] efi_loader: fill simple network protocol revision

Message ID 20171005143607.25955-8-xypron.glpk@gmx.de
State Accepted
Delegated to: Alexander Graf
Headers show
Series efi_loader: Simple Network Protocol | expand

Commit Message

Heinrich Schuchardt Oct. 5, 2017, 2:35 p.m. UTC
Provide the simple network protocol revision.
This revision number could be used to identify backwards compatible
enhancements of the protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
v2
	no change
---
 include/efi_api.h        | 3 +++
 lib/efi_loader/efi_net.c | 1 +
 2 files changed, 4 insertions(+)

Comments

Simon Glass Oct. 9, 2017, 4:44 a.m. UTC | #1
On 5 October 2017 at 08:35, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> Provide the simple network protocol revision.
> This revision number could be used to identify backwards compatible
> enhancements of the protocol.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> v2
>         no change
> ---
>  include/efi_api.h        | 3 +++
>  lib/efi_loader/efi_net.c | 1 +
>  2 files changed, 4 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/include/efi_api.h b/include/efi_api.h
index 8c227ce703..2f31464cb3 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -600,6 +600,9 @@  struct efi_simple_network_mode {
 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS           0x08
 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
 
+/* revision of the simple network protocol */
+#define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION	0x00010000
+
 struct efi_simple_network
 {
 	u64 revision;
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c
index 91f1e4a69e..fb23bcf633 100644
--- a/lib/efi_loader/efi_net.c
+++ b/lib/efi_loader/efi_net.c
@@ -228,6 +228,7 @@  int efi_net_register(void)
 	netobj->parent.protocols[2].guid = &efi_pxe_guid;
 	netobj->parent.protocols[2].protocol_interface = &netobj->pxe;
 	netobj->parent.handle = &netobj->net;
+	netobj->net.revision = EFI_SIMPLE_NETWORK_PROTOCOL_REVISION;
 	netobj->net.start = efi_net_start;
 	netobj->net.stop = efi_net_stop;
 	netobj->net.initialize = efi_net_initialize;