2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
9 #ifndef __ECORE_DCBX_H__
10 #define __ECORE_DCBX_H__
13 #include "ecore_mcp.h"
14 #include "mcp_public.h"
17 #include "ecore_hsi_common.h"
18 #include "ecore_dcbx_api.h"
20 #define ECORE_MFW_GET_FIELD(name, field) \
21 (((name) & (field ## _MASK)) >> (field ## _SHIFT))
23 struct ecore_dcbx_info {
24 struct lldp_status_params_s lldp_remote[LLDP_MAX_LLDP_AGENTS];
25 struct lldp_config_params_s lldp_local[LLDP_MAX_LLDP_AGENTS];
26 struct dcbx_local_params local_admin;
27 struct ecore_dcbx_results results;
28 struct dcb_dscp_map dscp_map;
30 struct dcbx_mib operational;
31 struct dcbx_mib remote;
32 struct ecore_dcbx_set set;
33 struct ecore_dcbx_get get;
37 struct ecore_dcbx_mib_meta_data {
38 struct lldp_config_params_s *lldp_local;
39 struct lldp_status_params_s *lldp_remote;
40 struct dcbx_local_params *local_admin;
41 struct dcb_dscp_map *dscp_map;
47 /* ECORE local interface routines */
49 ecore_dcbx_mib_update_event(struct ecore_hwfn *, struct ecore_ptt *,
50 enum ecore_mib_read_type);
52 enum _ecore_status_t ecore_dcbx_read_lldp_params(struct ecore_hwfn *,
54 enum _ecore_status_t ecore_dcbx_info_alloc(struct ecore_hwfn *p_hwfn);
55 void ecore_dcbx_info_free(struct ecore_hwfn *, struct ecore_dcbx_info *);
56 void ecore_dcbx_set_pf_update_params(struct ecore_dcbx_results *p_src,
57 struct pf_update_ramrod_data *p_dest);
59 #endif /* __ECORE_DCBX_H__ */