From: Michael Chan Date: Tue, 6 Dec 2011 10:58:08 +0000 (+0000) Subject: bnx2x: Fix compile errors if CONFIG_CNIC is not set X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~520 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3b8112ad00459fb66e4db93424211be9ecc25fbe;p=users%2Fjedix%2Flinux-maple.git 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 (cherry picked from commit f2fd5c3458ffcf4f9b4fbfa64980dffe1850f7de) Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 474619b3d7e5e..7fae401a68850 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c @@ -2927,6 +2927,7 @@ static void bnx2x_drv_info_ether_stat(struct bnx2x *bp) static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp) { +#ifdef BCM_CNIC struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app; struct fcoe_stats_info *fcoe_stat = &bp->slowpath->drv_info_to_mcp.fcoe_stat; @@ -3010,7 +3011,6 @@ static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp) fcoe_q_xstorm_stats->mcast_pkts_sent); } -#ifdef BCM_CNIC /* ask L5 driver to add data to the struct */ bnx2x_cnic_notify(bp, CNIC_CTL_FCOE_STATS_GET_CMD); #endif @@ -3018,6 +3018,7 @@ static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp) static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp) { +#ifdef BCM_CNIC struct bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app; struct iscsi_stats_info *iscsi_stat = &bp->slowpath->drv_info_to_mcp.iscsi_stat; @@ -3027,7 +3028,6 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp) iscsi_stat->qos_priority = app->traffic_type_priority[LLFC_TRAFFIC_TYPE_ISCSI]; -#ifdef BCM_CNIC /* ask L5 driver to add data to the struct */ bnx2x_cnic_notify(bp, CNIC_CTL_ISCSI_STATS_GET_CMD); #endif