summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSatish Baddipadige <sbaddipa@broadcom.com>2015-12-27 18:19:21 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-28 00:57:28 -0500
commit665e350ddbfde88c5c18142dfd7b8c64556bc964 (patch)
treea48c91213f6f3cf7bace283189796fce9a51fb50 /drivers
parent2731d70fa9cbb62e45743171bf979784fb36778c (diff)
bnxt_en: Increment checksum error counter only if NETIF_F_RXCSUM is set.
rx_l4_csum_error is now incremented only when offload is enabled Signed-off-by: Satish Baddipadige <sbaddipa@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index e340fb31ed78..3ce3bd337bb3 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1187,8 +1187,10 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons,
skb->csum_level = RX_CMP_ENCAP(rxcmp1);
}
} else {
- if (rxcmp1->rx_cmp_cfa_code_errors_v2 & RX_CMP_L4_CS_ERR_BITS)
- cpr->rx_l4_csum_errors++;
+ if (rxcmp1->rx_cmp_cfa_code_errors_v2 & RX_CMP_L4_CS_ERR_BITS) {
+ if (dev->features & NETIF_F_RXCSUM)
+ cpr->rx_l4_csum_errors++;
+ }
}
skb_record_rx_queue(skb, bnapi->index);