aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2011-11-13 04:34:27 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-13 16:03:55 -0500
commitb363782761eea7076619fe44063b915dae0b4cc7 (patch)
treeae3c227d8fbf803bc3818424ec32a1ff650f9ed1 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
parentbnx2x: DCBX: use #define instead of magic (diff)
downloadlinux-dev-b363782761eea7076619fe44063b915dae0b4cc7.tar.xz
linux-dev-b363782761eea7076619fe44063b915dae0b4cc7.zip
bnx2x: simplify definition of RX_SGE_MASK_LEN and use it.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 59f1291b2f78..260226d09916 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -874,8 +874,7 @@ static inline void bnx2x_clear_sge_mask_next_elems(struct bnx2x_fastpath *fp)
static inline void bnx2x_init_sge_ring_bit_mask(struct bnx2x_fastpath *fp)
{
/* Set the mask to all 1-s: it's faster to compare to 0 than to 0xf-s */
- memset(fp->sge_mask, 0xff,
- (NUM_RX_SGE >> BIT_VEC64_ELEM_SHIFT)*sizeof(u64));
+ memset(fp->sge_mask, 0xff, sizeof(fp->sge_mask));
/* Clear the two last indices in the page to 1:
these are the indices that correspond to the "next" element,