aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 07b3fb5175e5..56a11e29af0b 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -4450,9 +4450,8 @@ static inline int rtl8169_fragmented_frame(u32 status)
4450 return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag); 4450 return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag);
4451} 4451}
4452 4452
4453static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc) 4453static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1)
4454{ 4454{
4455 u32 opts1 = le32_to_cpu(desc->opts1);
4456 u32 status = opts1 & RxProtoMask; 4455 u32 status = opts1 & RxProtoMask;
4457 4456
4458 if (((status == RxProtoTCP) && !(opts1 & TCPFail)) || 4457 if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
@@ -4546,8 +4545,6 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
4546 continue; 4545 continue;
4547 } 4546 }
4548 4547
4549 rtl8169_rx_csum(skb, desc);
4550
4551 if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) { 4548 if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) {
4552 pci_dma_sync_single_for_device(pdev, addr, 4549 pci_dma_sync_single_for_device(pdev, addr,
4553 pkt_size, PCI_DMA_FROMDEVICE); 4550 pkt_size, PCI_DMA_FROMDEVICE);
@@ -4558,6 +4555,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
4558 tp->Rx_skbuff[entry] = NULL; 4555 tp->Rx_skbuff[entry] = NULL;
4559 } 4556 }
4560 4557
4558 rtl8169_rx_csum(skb, status);
4561 skb_put(skb, pkt_size); 4559 skb_put(skb, pkt_size);
4562 skb->protocol = eth_type_trans(skb, dev); 4560 skb->protocol = eth_type_trans(skb, dev);
4563 4561