2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
6 * bfa_defs_cee.h Interface declarations between host based
7 * BFAL and DCBX/LLDP module in Firmware
9 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License (GPL) Version 2 as
13 * published by the Free Software Foundation
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 #ifndef __BFA_DEFS_CEE_H__
21 #define __BFA_DEFS_CEE_H__
23 #include <defs/bfa_defs_types.h>
24 #include <defs/bfa_defs_pport.h>
25 #include <protocol/types.h>
29 #define BFA_CEE_LLDP_MAX_STRING_LEN (128)
31 #define BFA_CEE_LLDP_SYS_CAP_OTHER 0x0001
32 #define BFA_CEE_LLDP_SYS_CAP_REPEATER 0x0002
33 #define BFA_CEE_LLDP_SYS_CAP_MAC_BRIDGE 0x0004
34 #define BFA_CEE_LLDP_SYS_CAP_WLAN_AP 0x0008
35 #define BFA_CEE_LLDP_SYS_CAP_ROUTER 0x0010
36 #define BFA_CEE_LLDP_SYS_CAP_TELEPHONE 0x0020
37 #define BFA_CEE_LLDP_SYS_CAP_DOCSIS_CD 0x0040
38 #define BFA_CEE_LLDP_SYS_CAP_STATION 0x0080
39 #define BFA_CEE_LLDP_SYS_CAP_CVLAN 0x0100
40 #define BFA_CEE_LLDP_SYS_CAP_SVLAN 0x0200
41 #define BFA_CEE_LLDP_SYS_CAP_TPMR 0x0400
44 /* LLDP string type */
45 struct bfa_cee_lldp_str_s
{
49 u8 value
[BFA_CEE_LLDP_MAX_STRING_LEN
];
54 struct bfa_cee_lldp_cfg_s
{
55 struct bfa_cee_lldp_str_s chassis_id
;
56 struct bfa_cee_lldp_str_s port_id
;
57 struct bfa_cee_lldp_str_s port_desc
;
58 struct bfa_cee_lldp_str_s sys_name
;
59 struct bfa_cee_lldp_str_s sys_desc
;
60 struct bfa_cee_lldp_str_s mgmt_addr
;
62 u16 enabled_system_cap
;
65 enum bfa_cee_dcbx_version_e
{
66 DCBX_PROTOCOL_PRECEE
= 1,
67 DCBX_PROTOCOL_CEE
= 2,
71 CEE_LLS_DOWN_NO_TLV
= 0, /* LLS is down because the TLV not sent by
73 CEE_LLS_DOWN
= 1, /* LLS is down as advertised by the peer */
77 /* CEE/DCBX parameters */
78 struct bfa_cee_dcbx_cfg_s
{
81 u8 pfc_enabled
; /* bitmap of priorties with PFC enabled */
82 u8 fcoe_user_priority
; /* bitmap of priorities used for FcoE
84 u8 dcbx_version
; /* operating version:CEE or preCEE */
85 u8 lls_fcoe
; /* FCoE Logical Link Status */
86 u8 lls_lan
; /* LAN Logical Link Status */
91 /* Making this to tri-state for the benefit of port list command */
92 enum bfa_cee_status_e
{
100 struct bfa_cee_attr_s
{
103 struct bfa_cee_lldp_cfg_s lldp_remote
;
104 struct bfa_cee_dcbx_cfg_s dcbx_remote
;
114 /* LLDP/DCBX/CEE Statistics */
116 struct bfa_cee_lldp_stats_s
{
117 u32 frames_transmitted
;
119 u32 frames_discarded
;
123 u32 tlvs_unrecognized
;
126 struct bfa_cee_dcbx_stats_s
{
127 u32 subtlvs_unrecognized
;
128 u32 negotiation_failed
;
129 u32 remote_cfg_changed
;
138 struct bfa_cee_cfg_stats_s
{
141 u32 cee_hw_cfg_changed
;
142 u32 recvd_invalid_cfg
;
146 struct bfa_cee_stats_s
{
147 struct bfa_cee_lldp_stats_s lldp_stats
;
148 struct bfa_cee_dcbx_stats_s dcbx_stats
;
149 struct bfa_cee_cfg_stats_s cfg_stats
;
155 #endif /* __BFA_DEFS_CEE_H__ */