Skip to content

Commit f2fd5c3

Browse files
Michael Chandavem330
authored andcommitted
bnx2x: Fix compile errors if CONFIG_CNIC is not set
Don't provide FCoE and iSCSI statistics to management firmware if CONFIG_CNIC is not set. Some needed structure fields are not defined without CONFIG_CNIC. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8ef874b commit f2fd5c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2943,6 +2943,7 @@ static void bnx2x_drv_info_ether_stat(struct bnx2x *bp)
29432943

29442944
static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)
29452945
{
2946+
#ifdef BCM_CNIC
29462947
struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app;
29472948
struct fcoe_stats_info *fcoe_stat =
29482949
&bp->slowpath->drv_info_to_mcp.fcoe_stat;
@@ -3026,14 +3027,14 @@ static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)
30263027
fcoe_q_xstorm_stats->mcast_pkts_sent);
30273028
}
30283029

3029-
#ifdef BCM_CNIC
30303030
/* ask L5 driver to add data to the struct */
30313031
bnx2x_cnic_notify(bp, CNIC_CTL_FCOE_STATS_GET_CMD);
30323032
#endif
30333033
}
30343034

30353035
static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
30363036
{
3037+
#ifdef BCM_CNIC
30373038
struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app;
30383039
struct iscsi_stats_info *iscsi_stat =
30393040
&bp->slowpath->drv_info_to_mcp.iscsi_stat;
@@ -3043,7 +3044,6 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
30433044
iscsi_stat->qos_priority =
30443045
app->traffic_type_priority[LLFC_TRAFFIC_TYPE_ISCSI];
30453046

3046-
#ifdef BCM_CNIC
30473047
/* ask L5 driver to add data to the struct */
30483048
bnx2x_cnic_notify(bp, CNIC_CTL_ISCSI_STATS_GET_CMD);
30493049
#endif

0 commit comments

Comments
 (0)