mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 10:49:28 +00:00
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>
This commit is contained in:
parent
8ef874bfc7
commit
f2fd5c3458
1 changed files with 2 additions and 2 deletions
|
@ -2943,6 +2943,7 @@ static void bnx2x_drv_info_ether_stat(struct bnx2x *bp)
|
||||||
|
|
||||||
static void bnx2x_drv_info_fcoe_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 bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app;
|
||||||
struct fcoe_stats_info *fcoe_stat =
|
struct fcoe_stats_info *fcoe_stat =
|
||||||
&bp->slowpath->drv_info_to_mcp.fcoe_stat;
|
&bp->slowpath->drv_info_to_mcp.fcoe_stat;
|
||||||
|
@ -3026,7 +3027,6 @@ static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)
|
||||||
fcoe_q_xstorm_stats->mcast_pkts_sent);
|
fcoe_q_xstorm_stats->mcast_pkts_sent);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BCM_CNIC
|
|
||||||
/* ask L5 driver to add data to the struct */
|
/* ask L5 driver to add data to the struct */
|
||||||
bnx2x_cnic_notify(bp, CNIC_CTL_FCOE_STATS_GET_CMD);
|
bnx2x_cnic_notify(bp, CNIC_CTL_FCOE_STATS_GET_CMD);
|
||||||
#endif
|
#endif
|
||||||
|
@ -3034,6 +3034,7 @@ static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)
|
||||||
|
|
||||||
static void bnx2x_drv_info_iscsi_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 bnx2x_dcbx_app_params *app = &bp->dcbx_port_params.app;
|
||||||
struct iscsi_stats_info *iscsi_stat =
|
struct iscsi_stats_info *iscsi_stat =
|
||||||
&bp->slowpath->drv_info_to_mcp.iscsi_stat;
|
&bp->slowpath->drv_info_to_mcp.iscsi_stat;
|
||||||
|
@ -3043,7 +3044,6 @@ static void bnx2x_drv_info_iscsi_stat(struct bnx2x *bp)
|
||||||
iscsi_stat->qos_priority =
|
iscsi_stat->qos_priority =
|
||||||
app->traffic_type_priority[LLFC_TRAFFIC_TYPE_ISCSI];
|
app->traffic_type_priority[LLFC_TRAFFIC_TYPE_ISCSI];
|
||||||
|
|
||||||
#ifdef BCM_CNIC
|
|
||||||
/* ask L5 driver to add data to the struct */
|
/* ask L5 driver to add data to the struct */
|
||||||
bnx2x_cnic_notify(bp, CNIC_CTL_ISCSI_STATS_GET_CMD);
|
bnx2x_cnic_notify(bp, CNIC_CTL_ISCSI_STATS_GET_CMD);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue