iPXE
Data Structures | Functions
mlx_vmac.h File Reference
#include "../../include/public/mlx_utils.h"

Go to the source code of this file.

Data Structures

struct  mlx_vmac_query_virt_mac
 
struct  mlx_vmac_set_virt_mac
 

Functions

 FILE_LICENCE (GPL2_OR_LATER)
 
mlx_status mlx_vmac_query_virt_mac (IN mlx_utils *utils, OUT struct mlx_vmac_query_virt_mac *virt_mac)
 
mlx_status mlx_vmac_set_virt_mac (IN mlx_utils *utils, OUT struct mlx_vmac_set_virt_mac *virt_mac)
 

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ mlx_vmac_query_virt_mac()

Definition at line 27 of file mlx_vmac.c.

31 {
33  if (utils == NULL || virt_mac == NULL) {
35  goto bad_param;
36  }
37 
39  utils,
41  virt_mac,
42  0,
43  sizeof(*virt_mac)
44  );
45  MLX_CHECK_STATUS(utils, status, icmd_err, "mlx_icmd_send_command failed");
46 icmd_err:
47 bad_param:
48  return status;
49 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_icmd_send_command(IN mlx_utils *utils, IN mlx_uint16 opcode, IN OUT mlx_void *data, IN mlx_uint32 write_data_size, IN mlx_uint32 read_data_size)
Definition: mlx_icmd.c:310
uint8_t status
Status.
Definition: ena.h:16
#define MLX_SUCCESS
int mlx_status
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References MLX_CHECK_STATUS, mlx_icmd_send_command(), MLX_INVALID_PARAMETER, MLX_SUCCESS, NULL, QUERY_VIRTUAL_MAC, and status.

Referenced by flexboot_nodnic_get_factory_mac().

◆ mlx_vmac_set_virt_mac()

mlx_status mlx_vmac_set_virt_mac ( IN mlx_utils utils,
OUT struct mlx_vmac_set_virt_mac virt_mac 
)

Definition at line 52 of file mlx_vmac.c.

56 {
58  if (utils == NULL || virt_mac == NULL) {
60  goto bad_param;
61  }
62 
64  utils,
66  virt_mac,
67  sizeof(*virt_mac),
68  0
69  );
70  MLX_CHECK_STATUS(utils, status, icmd_err, "mlx_icmd_send_command failed");
71 icmd_err:
72 bad_param:
73  return status;
74 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_icmd_send_command(IN mlx_utils *utils, IN mlx_uint16 opcode, IN OUT mlx_void *data, IN mlx_uint32 write_data_size, IN mlx_uint32 read_data_size)
Definition: mlx_icmd.c:310
uint8_t status
Status.
Definition: ena.h:16
#define MLX_SUCCESS
int mlx_status
#define MLX_CHECK_STATUS(id, status, label, message)
Definition: mlx_bail.h:37
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References MLX_CHECK_STATUS, mlx_icmd_send_command(), MLX_INVALID_PARAMETER, MLX_SUCCESS, NULL, SET_VIRTUAL_MAC, and status.