#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */
+#if EFSYS_OPT_MAE
+
+typedef struct efx_mae_s {
+} efx_mae_t;
+
+#endif /* EFSYS_OPT_MAE */
+
#define EFX_DRV_VER_MAX 20
typedef struct efx_drv_cfg_s {
#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER
const efx_proxy_ops_t *en_epop;
#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */
+#if EFSYS_OPT_MAE
+ efx_mae_t *en_maep;
+#endif /* EFSYS_OPT_MAE */
};
#define EFX_FAMILY_IS_EF10(_enp) \
--- /dev/null
+/* SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright(c) 2019 Xilinx, Inc. All rights reserved.
+ * All rights reserved.
+ */
+
+#include "efx.h"
+#include "efx_impl.h"
+
+
+#if EFSYS_OPT_MAE
+
+ __checkReturn efx_rc_t
+efx_mae_init(
+ __in efx_nic_t *enp)
+{
+ const efx_nic_cfg_t *encp = efx_nic_cfg_get(enp);
+ efx_mae_t *maep;
+ efx_rc_t rc;
+
+ if (encp->enc_mae_supported == B_FALSE) {
+ rc = ENOTSUP;
+ goto fail1;
+ }
+
+ EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (*maep), maep);
+ if (maep == NULL) {
+ rc = ENOMEM;
+ goto fail2;
+ }
+
+ enp->en_maep = maep;
+
+ return (0);
+
+fail2:
+ EFSYS_PROBE(fail2);
+fail1:
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
+ return (rc);
+}
+
+ void
+efx_mae_fini(
+ __in efx_nic_t *enp)
+{
+ const efx_nic_cfg_t *encp = efx_nic_cfg_get(enp);
+ efx_mae_t *maep = enp->en_maep;
+
+ if (encp->enc_mae_supported == B_FALSE)
+ return;
+
+ EFSYS_KMEM_FREE(enp->en_esip, sizeof (*maep), maep);
+ enp->en_maep = NULL;
+}
+
+#endif /* EFSYS_OPT_MAE */