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)
32 /* FIXME: this is coming from the protocol spec. Can the host & apps share the
35 #define BFA_CEE_LLDP_SYS_CAP_OTHER 0x0001
36 #define BFA_CEE_LLDP_SYS_CAP_REPEATER 0x0002
37 #define BFA_CEE_LLDP_SYS_CAP_MAC_BRIDGE 0x0004
38 #define BFA_CEE_LLDP_SYS_CAP_WLAN_AP 0x0008
39 #define BFA_CEE_LLDP_SYS_CAP_ROUTER 0x0010
40 #define BFA_CEE_LLDP_SYS_CAP_TELEPHONE 0x0020
41 #define BFA_CEE_LLDP_SYS_CAP_DOCSIS_CD 0x0040
42 #define BFA_CEE_LLDP_SYS_CAP_STATION 0x0080
43 #define BFA_CEE_LLDP_SYS_CAP_CVLAN 0x0100
44 #define BFA_CEE_LLDP_SYS_CAP_SVLAN 0x0200
45 #define BFA_CEE_LLDP_SYS_CAP_TPMR 0x0400
48 /* LLDP string type */
49 struct bfa_cee_lldp_str_s
{
53 u8 value
[BFA_CEE_LLDP_MAX_STRING_LEN
];
58 struct bfa_cee_lldp_cfg_s
{
59 struct bfa_cee_lldp_str_s chassis_id
;
60 struct bfa_cee_lldp_str_s port_id
;
61 struct bfa_cee_lldp_str_s port_desc
;
62 struct bfa_cee_lldp_str_s sys_name
;
63 struct bfa_cee_lldp_str_s sys_desc
;
64 struct bfa_cee_lldp_str_s mgmt_addr
;
66 u16 enabled_system_cap
;
69 enum bfa_cee_dcbx_version_e
{
70 DCBX_PROTOCOL_PRECEE
= 1,
71 DCBX_PROTOCOL_CEE
= 2,
75 CEE_LLS_DOWN_NO_TLV
= 0, /* LLS is down because the TLV not sent by
77 CEE_LLS_DOWN
= 1, /* LLS is down as advertised by the peer */
81 /* CEE/DCBX parameters */
82 struct bfa_cee_dcbx_cfg_s
{
85 u8 pfc_enabled
; /* bitmap of priorties with PFC enabled */
86 u8 fcoe_user_priority
; /* bitmap of priorities used for FcoE
88 u8 dcbx_version
; /* operating version:CEE or preCEE */
89 u8 lls_fcoe
; /* FCoE Logical Link Status */
90 u8 lls_lan
; /* LAN Logical Link Status */
95 /* Making this to tri-state for the benefit of port list command */
96 enum bfa_cee_status_e
{
103 struct bfa_cee_attr_s
{
106 struct bfa_cee_lldp_cfg_s lldp_remote
;
107 struct bfa_cee_dcbx_cfg_s dcbx_remote
;
116 /* LLDP/DCBX/CEE Statistics */
118 struct bfa_cee_lldp_stats_s
{
119 u32 frames_transmitted
;
121 u32 frames_discarded
;
125 u32 tlvs_unrecognized
;
128 struct bfa_cee_dcbx_stats_s
{
129 u32 subtlvs_unrecognized
;
130 u32 negotiation_failed
;
131 u32 remote_cfg_changed
;
140 struct bfa_cee_cfg_stats_s
{
143 u32 cee_hw_cfg_changed
;
144 u32 recvd_invalid_cfg
;
148 struct bfa_cee_stats_s
{
149 struct bfa_cee_lldp_stats_s lldp_stats
;
150 struct bfa_cee_dcbx_stats_s dcbx_stats
;
151 struct bfa_cee_cfg_stats_s cfg_stats
;
157 #endif /* __BFA_DEFS_CEE_H__ */