Skip to content

Commit ce7fa78

Browse files
Yuval Mintzdavem330
authored andcommitted
bnx2x: Fix compilation when CONFIG_BNX2X_SRIOV is not set
Commit 05cc5a3 ("bnx2x: add vlan filtering offload") has broken compilation when CONFIG_BNX2X_SRIOV is not set. Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent cfcbe85 commit ce7fa78

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13091,8 +13091,10 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
1309113091
bp->accept_any_vlan = true;
1309213092
else
1309313093
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
13094+
#ifdef CONFIG_BNX2X_SRIOV
1309413095
} else if (bp->acquire_resp.pfdev_info.pf_cap & PFVF_CAP_VLAN_FILTER) {
1309513096
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
13097+
#endif
1309613098
}
1309713099

1309813100
dev->features |= dev->hw_features | NETIF_F_HW_VLAN_CTAG_RX;

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,11 @@ int bnx2x_set_vf_link_state(struct net_device *dev, int vf, int link_state);
551551
int bnx2x_vfpf_update_vlan(struct bnx2x *bp, u16 vid, u8 vf_qid, bool add);
552552
#else /* CONFIG_BNX2X_SRIOV */
553553

554+
#define GET_NUM_VFS_PER_PATH(bp) 0
555+
#define GET_NUM_VFS_PER_PF(bp) 0
556+
#define VF_MAC_CREDIT_CNT 0
557+
#define VF_VLAN_CREDIT_CNT 0
558+
554559
static inline void bnx2x_iov_set_queue_sp_obj(struct bnx2x *bp, int vf_cid,
555560
struct bnx2x_queue_sp_obj **q_obj) {}
556561
static inline void bnx2x_vf_handle_flr_event(struct bnx2x *bp) {}

0 commit comments

Comments
 (0)