aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 60ff9b6c929d..ec08f833c32d 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1660,7 +1660,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget)
1660 rmb(); 1660 rmb();
1661 while (sw_cons != hw_cons) { 1661 while (sw_cons != hw_cons) {
1662 unsigned int len; 1662 unsigned int len;
1663 u16 status; 1663 u32 status;
1664 struct sw_bd *rx_buf; 1664 struct sw_bd *rx_buf;
1665 struct sk_buff *skb; 1665 struct sk_buff *skb;
1666 1666
@@ -1676,7 +1676,7 @@ bnx2_rx_int(struct bnx2 *bp, int budget)
1676 rx_hdr = (struct l2_fhdr *) skb->data; 1676 rx_hdr = (struct l2_fhdr *) skb->data;
1677 len = rx_hdr->l2_fhdr_pkt_len - 4; 1677 len = rx_hdr->l2_fhdr_pkt_len - 4;
1678 1678
1679 if (rx_hdr->l2_fhdr_errors & 1679 if ((status = rx_hdr->l2_fhdr_status) &
1680 (L2_FHDR_ERRORS_BAD_CRC | 1680 (L2_FHDR_ERRORS_BAD_CRC |
1681 L2_FHDR_ERRORS_PHY_DECODE | 1681 L2_FHDR_ERRORS_PHY_DECODE |
1682 L2_FHDR_ERRORS_ALIGNMENT | 1682 L2_FHDR_ERRORS_ALIGNMENT |
@@ -1735,15 +1735,13 @@ reuse_rx:
1735 1735
1736 } 1736 }
1737 1737
1738 status = rx_hdr->l2_fhdr_status;
1739 skb->ip_summed = CHECKSUM_NONE; 1738 skb->ip_summed = CHECKSUM_NONE;
1740 if (bp->rx_csum && 1739 if (bp->rx_csum &&
1741 (status & (L2_FHDR_STATUS_TCP_SEGMENT | 1740 (status & (L2_FHDR_STATUS_TCP_SEGMENT |
1742 L2_FHDR_STATUS_UDP_DATAGRAM))) { 1741 L2_FHDR_STATUS_UDP_DATAGRAM))) {
1743 1742
1744 u16 cksum = rx_hdr->l2_fhdr_tcp_udp_xsum; 1743 if (likely((status & (L2_FHDR_ERRORS_TCP_XSUM |
1745 1744 L2_FHDR_ERRORS_UDP_XSUM)) == 0))
1746 if (cksum == 0xffff)
1747 skb->ip_summed = CHECKSUM_UNNECESSARY; 1745 skb->ip_summed = CHECKSUM_UNNECESSARY;
1748 } 1746 }
1749 1747
@@ -3978,7 +3976,7 @@ bnx2_test_loopback(struct bnx2 *bp)
3978 pci_unmap_addr(rx_buf, mapping), 3976 pci_unmap_addr(rx_buf, mapping),
3979 bp->rx_buf_size, PCI_DMA_FROMDEVICE); 3977 bp->rx_buf_size, PCI_DMA_FROMDEVICE);
3980 3978
3981 if (rx_hdr->l2_fhdr_errors & 3979 if (rx_hdr->l2_fhdr_status &
3982 (L2_FHDR_ERRORS_BAD_CRC | 3980 (L2_FHDR_ERRORS_BAD_CRC |
3983 L2_FHDR_ERRORS_PHY_DECODE | 3981 L2_FHDR_ERRORS_PHY_DECODE |
3984 L2_FHDR_ERRORS_ALIGNMENT | 3982 L2_FHDR_ERRORS_ALIGNMENT |