summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/cnic.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2013-09-02 11:42:29 -0700
committerDavid S. Miller <davem@davemloft.net>2013-09-04 00:27:26 -0400
commit5e65789f694f2977fb7169c500b4997772f5278b (patch)
treebdcd2a980fed215eae15c6b45473c64edd9e1d19 /drivers/net/ethernet/broadcom/cnic.h
parent104a43edb264321a4d41850e98153b4fa8a9ef42 (diff)
cnic: Redefine BNX2X_HW_CID using existing bnx2x macros
to avoid duplication of the same logic. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic.h')
-rw-r--r--drivers/net/ethernet/broadcom/cnic.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.h b/drivers/net/ethernet/broadcom/cnic.h
index 519f587a25d..0408ae286b8 100644
--- a/drivers/net/ethernet/broadcom/cnic.h
+++ b/drivers/net/ethernet/broadcom/cnic.h
@@ -401,10 +401,9 @@ struct bnx2x_bd_chain_next {
#define CNIC_PORT(cp) ((cp)->pfid & 1)
#define CNIC_FUNC(cp) ((cp)->func)
-#define CNIC_E1HVN(cp) ((cp)->pfid >> 1)
-#define BNX2X_HW_CID(cp, x) ((CNIC_PORT(cp) << 23) | \
- (CNIC_E1HVN(cp) << 17) | (x))
+#define BNX2X_HW_CID(bp, x) ((BP_PORT(bp) << 23) | \
+ (BP_VN(bp) << 17) | (x))
#define BNX2X_SW_CID(x) (x & 0x1ffff)