bnx2x: Fix build with SRIOV disabled.
authorDavid S. Miller <davem@davemloft.net>
Thu, 26 Dec 2013 23:33:10 +0000 (18:33 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Dec 2013 23:33:10 +0000 (18:33 -0500)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function 'bnx2x_drv_info_ether_stat':
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:3302:46: error: dereferencing pointer to incomplete type
make[6]: *** [drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.o] Error 1

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

index 094dfc8f7656be13e2f8ec38e7bc9b5e364a8ad7..d3748bf3ac7ba83bcba77807584b725f4a00dc14 100644 (file)
@@ -3299,7 +3299,9 @@ static void bnx2x_drv_info_ether_stat(struct bnx2x *bp)
        ether_stat->txq_size = bp->tx_ring_size;
        ether_stat->rxq_size = bp->rx_ring_size;
 
+#ifdef CONFIG_BNX2X_SRIOV
        ether_stat->vf_cnt = IS_SRIOV(bp) ? bp->vfdb->sriov.nr_virtfn : 0;
+#endif
 }
 
 static void bnx2x_drv_info_fcoe_stat(struct bnx2x *bp)