+typedef struct efx_phy_link_state_s {
+ uint32_t epls_adv_cap_mask;
+ uint32_t epls_lp_cap_mask;
+ uint32_t epls_ld_cap_mask;
+ unsigned int epls_fcntl;
+ efx_phy_fec_type_t epls_fec;
+ efx_link_mode_t epls_link_mode;
+} efx_phy_link_state_t;
+
+extern __checkReturn efx_rc_t
+efx_phy_link_state_get(
+ __in efx_nic_t *enp,
+ __out efx_phy_link_state_t *eplsp);
+
+
+#if EFSYS_OPT_EVB
+
+typedef uint32_t efx_vswitch_id_t;
+typedef uint32_t efx_vport_id_t;
+
+typedef enum efx_vswitch_type_e {
+ EFX_VSWITCH_TYPE_VLAN = 1,
+ EFX_VSWITCH_TYPE_VEB,
+ /* VSWITCH_TYPE_VEPA: obsolete */
+ EFX_VSWITCH_TYPE_MUX = 4,
+} efx_vswitch_type_t;
+
+typedef enum efx_vport_type_e {
+ EFX_VPORT_TYPE_NORMAL = 4,
+ EFX_VPORT_TYPE_EXPANSION,
+ EFX_VPORT_TYPE_TEST,
+} efx_vport_type_t;
+
+/* Unspecified VLAN ID to support disabling of VLAN filtering */
+#define EFX_FILTER_VID_UNSPEC 0xffff
+#define EFX_DEFAULT_VSWITCH_ID 1
+
+/* Default VF VLAN ID on creation */
+#define EFX_VF_VID_DEFAULT EFX_FILTER_VID_UNSPEC
+#define EFX_VPORT_ID_INVALID 0
+
+typedef struct efx_vport_config_s {
+ /* Either VF index or 0xffff for PF */
+ uint16_t evc_function;
+ /* VLAN ID of the associated function */
+ uint16_t evc_vid;
+ /* vport id shared with client driver */
+ efx_vport_id_t evc_vport_id;
+ /* MAC address of the associated function */
+ uint8_t evc_mac_addr[EFX_MAC_ADDR_LEN];
+ /*
+ * vports created with this flag set may only transfer traffic on the
+ * VLANs permitted by the vport. Also, an attempt to install filter with
+ * VLAN will be refused unless requesting function has VLAN privilege.
+ */
+ boolean_t evc_vlan_restrict;
+ /* Whether this function is assigned or not */
+ boolean_t evc_vport_assigned;
+} efx_vport_config_t;
+
+typedef struct efx_vswitch_s efx_vswitch_t;
+
+extern __checkReturn efx_rc_t
+efx_evb_init(
+ __in efx_nic_t *enp);
+
+extern void
+efx_evb_fini(
+ __in efx_nic_t *enp);
+
+extern __checkReturn efx_rc_t
+efx_evb_vswitch_create(
+ __in efx_nic_t *enp,
+ __in uint32_t num_vports,
+ __inout_ecount(num_vports) efx_vport_config_t *vport_configp,
+ __deref_out efx_vswitch_t **evpp);
+
+extern __checkReturn efx_rc_t
+efx_evb_vswitch_destroy(
+ __in efx_nic_t *enp,
+ __in efx_vswitch_t *evp);
+
+extern __checkReturn efx_rc_t
+efx_evb_vport_mac_set(
+ __in efx_nic_t *enp,
+ __in efx_vswitch_t *evp,
+ __in efx_vport_id_t vport_id,
+ __in_bcount(EFX_MAC_ADDR_LEN) uint8_t *addrp);
+
+extern __checkReturn efx_rc_t
+efx_evb_vport_vlan_set(
+ __in efx_nic_t *enp,
+ __in efx_vswitch_t *evp,
+ __in efx_vport_id_t vport_id,
+ __in uint16_t vid);
+
+extern __checkReturn efx_rc_t
+efx_evb_vport_reset(
+ __in efx_nic_t *enp,
+ __in efx_vswitch_t *evp,
+ __in efx_vport_id_t vport_id,
+ __in_bcount(EFX_MAC_ADDR_LEN) uint8_t *addrp,
+ __in uint16_t vid,
+ __out boolean_t *is_fn_resetp);
+
+extern __checkReturn efx_rc_t
+efx_evb_vport_stats(
+ __in efx_nic_t *enp,
+ __in efx_vswitch_t *evp,
+ __in efx_vport_id_t vport_id,
+ __out efsys_mem_t *stats_bufferp);
+
+#endif /* EFSYS_OPT_EVB */
+
+#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER
+
+typedef struct efx_proxy_auth_config_s {
+ efsys_mem_t *request_bufferp;
+ efsys_mem_t *response_bufferp;
+ efsys_mem_t *status_bufferp;
+ uint32_t block_cnt;
+ uint32_t *op_listp;
+ size_t op_count;
+ uint32_t handled_privileges;
+} efx_proxy_auth_config_t;
+
+typedef struct efx_proxy_cmd_params_s {
+ uint32_t pf_index;
+ uint32_t vf_index;
+ uint8_t *request_bufferp;
+ size_t request_size;
+ uint8_t *response_bufferp;
+ size_t response_size;
+ size_t *response_size_actualp;
+} efx_proxy_cmd_params_t;
+
+extern __checkReturn efx_rc_t
+efx_proxy_auth_init(
+ __in efx_nic_t *enp);
+
+extern void
+efx_proxy_auth_fini(
+ __in efx_nic_t *enp);
+
+extern __checkReturn efx_rc_t
+efx_proxy_auth_configure(
+ __in efx_nic_t *enp,
+ __in efx_proxy_auth_config_t *configp);
+
+ __checkReturn efx_rc_t
+efx_proxy_auth_destroy(
+ __in efx_nic_t *enp,
+ __in uint32_t handled_privileges);
+
+ __checkReturn efx_rc_t
+efx_proxy_auth_complete_request(
+ __in efx_nic_t *enp,
+ __in uint32_t fn_index,
+ __in uint32_t proxy_result,
+ __in uint32_t handle);
+
+ __checkReturn efx_rc_t
+efx_proxy_auth_exec_cmd(
+ __in efx_nic_t *enp,
+ __inout efx_proxy_cmd_params_t *paramsp);
+
+ __checkReturn efx_rc_t
+efx_proxy_auth_set_privilege_mask(
+ __in efx_nic_t *enp,
+ __in uint32_t vf_index,
+ __in uint32_t mask,
+ __in uint32_t value);
+
+ __checkReturn efx_rc_t
+efx_proxy_auth_privilege_mask_get(
+ __in efx_nic_t *enp,
+ __in uint32_t pf_index,
+ __in uint32_t vf_index,
+ __out uint32_t *maskp);
+
+ __checkReturn efx_rc_t
+efx_proxy_auth_privilege_modify(
+ __in efx_nic_t *enp,
+ __in uint32_t pf_index,
+ __in uint32_t vf_index,
+ __in uint32_t add_privileges_mask,
+ __in uint32_t remove_privileges_mask);
+
+#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */
+