mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
efi_loader: efi_net: add efi_net_set_addr, efi_net_get_addr
Add the functions efi_net_set_addr and efi_net_get_addr to set and get the ip address from efi code in a network agnostic way. This could also go in net_common, or be compiled conditionally for each network stack. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
b98d232350
commit
b20f497f22
@@ -125,6 +125,22 @@ static inline void efi_set_bootdev(const char *dev, const char *devnr,
|
||||
size_t buffer_size) { }
|
||||
#endif
|
||||
|
||||
#if CONFIG_IS_ENABLED(NETDEVICES) && CONFIG_IS_ENABLED(EFI_LOADER)
|
||||
void efi_net_get_addr(struct efi_ipv4_address *ip,
|
||||
struct efi_ipv4_address *mask,
|
||||
struct efi_ipv4_address *gw);
|
||||
void efi_net_set_addr(struct efi_ipv4_address *ip,
|
||||
struct efi_ipv4_address *mask,
|
||||
struct efi_ipv4_address *gw);
|
||||
#else
|
||||
static inline void efi_net_get_addr(struct efi_ipv4_address *ip,
|
||||
struct efi_ipv4_address *mask,
|
||||
struct efi_ipv4_address *gw) { }
|
||||
static inline void efi_net_set_addr(struct efi_ipv4_address *ip,
|
||||
struct efi_ipv4_address *mask,
|
||||
struct efi_ipv4_address *gw) { }
|
||||
#endif
|
||||
|
||||
/* Maximum number of configuration tables */
|
||||
#define EFI_MAX_CONFIGURATION_TABLES 16
|
||||
|
||||
|
||||
Reference in New Issue
Block a user