aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/atm/he.c2
-rw-r--r--drivers/net/3c59x.c2
-rw-r--r--drivers/net/8139cp.c6
-rw-r--r--drivers/net/acenic.c8
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/cassini.c4
-rw-r--r--drivers/net/chelsio/sge.c10
-rw-r--r--drivers/net/dl2k.c2
-rw-r--r--drivers/net/e1000/e1000_main.c8
-rw-r--r--drivers/net/forcedeth.c3
-rw-r--r--drivers/net/gianfar.c2
-rw-r--r--drivers/net/hamachi.c2
-rw-r--r--drivers/net/ibm_emac/ibm_emac_core.c2
-rw-r--r--drivers/net/ioc3-eth.c2
-rw-r--r--drivers/net/ixgb/ixgb_main.c2
-rw-r--r--drivers/net/mv643xx_eth.c2
-rw-r--r--drivers/net/myri10ge/myri10ge.c8
-rw-r--r--drivers/net/ns83820.c2
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/s2io.c2
-rw-r--r--drivers/net/sk98lin/skge.c6
-rw-r--r--drivers/net/skge.c4
-rw-r--r--drivers/net/sky2.c6
-rw-r--r--drivers/net/starfire.c6
-rw-r--r--drivers/net/sungem.c4
-rw-r--r--drivers/net/sunhme.c6
-rw-r--r--drivers/net/tg3.c6
-rw-r--r--drivers/net/typhoon.c2
-rw-r--r--drivers/net/via-rhine.c2
-rw-r--r--drivers/net/via-velocity.c2
-rw-r--r--include/linux/netdevice.h4
-rw-r--r--include/linux/skbuff.h17
-rw-r--r--net/core/datagram.c4
-rw-r--r--net/core/dev.c12
-rw-r--r--net/core/netpoll.c2
-rw-r--r--net/core/skbuff.c14
-rw-r--r--net/ipv4/icmp.c2
-rw-r--r--net/ipv4/igmp.c2
-rw-r--r--net/ipv4/ip_fragment.c2
-rw-r--r--net/ipv4/ip_gre.c4
-rw-r--r--net/ipv4/ip_output.c6
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_tcp.c8
-rw-r--r--net/ipv4/ipvs/ip_vs_proto_udp.c8
-rw-r--r--net/ipv4/netfilter.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_tcp.c3
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_udp.c3
-rw-r--r--net/ipv4/netfilter/ip_nat_standalone.c5
-rw-r--r--net/ipv4/netfilter/ip_queue.c6
-rw-r--r--net/ipv4/netfilter/ipt_ECN.c9
-rw-r--r--net/ipv4/netfilter/ipt_TCPMSS.c5
-rw-r--r--net/ipv4/tcp.c8
-rw-r--r--net/ipv4/tcp_ipv4.c6
-rw-r--r--net/ipv4/tcp_output.c18
-rw-r--r--net/ipv4/udp.c6
-rw-r--r--net/ipv4/xfrm4_output.c4
-rw-r--r--net/ipv6/exthdrs.c2
-rw-r--r--net/ipv6/icmp.c2
-rw-r--r--net/ipv6/ip6_output.c2
-rw-r--r--net/ipv6/netfilter.c2
-rw-r--r--net/ipv6/netfilter/ip6_queue.c6
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c6
-rw-r--r--net/ipv6/raw.c2
-rw-r--r--net/ipv6/reassembly.c6
-rw-r--r--net/ipv6/tcp_ipv6.c6
-rw-r--r--net/ipv6/udp.c2
-rw-r--r--net/ipv6/xfrm6_output.c4
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c3
-rw-r--r--net/netfilter/nf_conntrack_proto_udp.c3
-rw-r--r--net/netfilter/nfnetlink_queue.c6
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/sched/sch_netem.c4
-rw-r--r--net/sunrpc/socklib.c2
72 files changed, 168 insertions, 169 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index ffcb9fd31c38..41e052fecd7f 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -1912,7 +1912,7 @@ he_service_rbrq(struct he_dev *he_dev, int group)
1912 skb->tail = skb->data + skb->len; 1912 skb->tail = skb->data + skb->len;
1913#ifdef USE_CHECKSUM_HW 1913#ifdef USE_CHECKSUM_HW
1914 if (vcc->vpi == 0 && vcc->vci >= ATM_NOT_RSV_VCI) { 1914 if (vcc->vpi == 0 && vcc->vci >= ATM_NOT_RSV_VCI) {
1915 skb->ip_summed = CHECKSUM_HW; 1915 skb->ip_summed = CHECKSUM_COMPLETE;
1916 skb->csum = TCP_CKSUM(skb->data, 1916 skb->csum = TCP_CKSUM(skb->data,
1917 he_vcc->pdu_len); 1917 he_vcc->pdu_len);
1918 } 1918 }
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 80e8ca013e44..29dede2eaa85 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -2077,7 +2077,7 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
2077 2077
2078 vp->tx_ring[entry].next = 0; 2078 vp->tx_ring[entry].next = 0;
2079#if DO_ZEROCOPY 2079#if DO_ZEROCOPY
2080 if (skb->ip_summed != CHECKSUM_HW) 2080 if (skb->ip_summed != CHECKSUM_PARTIAL)
2081 vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded); 2081 vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded);
2082 else 2082 else
2083 vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded | AddTCPChksum | AddUDPChksum); 2083 vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded | AddTCPChksum | AddUDPChksum);
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 1428bb7715af..a48b211c489d 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -813,7 +813,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
813 813
814 if (mss) 814 if (mss)
815 flags |= LargeSend | ((mss & MSSMask) << MSSShift); 815 flags |= LargeSend | ((mss & MSSMask) << MSSShift);
816 else if (skb->ip_summed == CHECKSUM_HW) { 816 else if (skb->ip_summed == CHECKSUM_PARTIAL) {
817 const struct iphdr *ip = skb->nh.iph; 817 const struct iphdr *ip = skb->nh.iph;
818 if (ip->protocol == IPPROTO_TCP) 818 if (ip->protocol == IPPROTO_TCP)
819 flags |= IPCS | TCPCS; 819 flags |= IPCS | TCPCS;
@@ -867,7 +867,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
867 if (mss) 867 if (mss)
868 ctrl |= LargeSend | 868 ctrl |= LargeSend |
869 ((mss & MSSMask) << MSSShift); 869 ((mss & MSSMask) << MSSShift);
870 else if (skb->ip_summed == CHECKSUM_HW) { 870 else if (skb->ip_summed == CHECKSUM_PARTIAL) {
871 if (ip->protocol == IPPROTO_TCP) 871 if (ip->protocol == IPPROTO_TCP)
872 ctrl |= IPCS | TCPCS; 872 ctrl |= IPCS | TCPCS;
873 else if (ip->protocol == IPPROTO_UDP) 873 else if (ip->protocol == IPPROTO_UDP)
@@ -898,7 +898,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)
898 txd->addr = cpu_to_le64(first_mapping); 898 txd->addr = cpu_to_le64(first_mapping);
899 wmb(); 899 wmb();
900 900
901 if (skb->ip_summed == CHECKSUM_HW) { 901 if (skb->ip_summed == CHECKSUM_PARTIAL) {
902 if (ip->protocol == IPPROTO_TCP) 902 if (ip->protocol == IPPROTO_TCP)
903 txd->opts1 = cpu_to_le32(first_eor | first_len | 903 txd->opts1 = cpu_to_le32(first_eor | first_len |
904 FirstFrag | DescOwn | 904 FirstFrag | DescOwn |
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 1c01e9b3d07c..826548644d7b 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -2040,7 +2040,7 @@ static void ace_rx_int(struct net_device *dev, u32 rxretprd, u32 rxretcsm)
2040 */ 2040 */
2041 if (bd_flags & BD_FLG_TCP_UDP_SUM) { 2041 if (bd_flags & BD_FLG_TCP_UDP_SUM) {
2042 skb->csum = htons(csum); 2042 skb->csum = htons(csum);
2043 skb->ip_summed = CHECKSUM_HW; 2043 skb->ip_summed = CHECKSUM_COMPLETE;
2044 } else { 2044 } else {
2045 skb->ip_summed = CHECKSUM_NONE; 2045 skb->ip_summed = CHECKSUM_NONE;
2046 } 2046 }
@@ -2511,7 +2511,7 @@ restart:
2511 2511
2512 mapping = ace_map_tx_skb(ap, skb, skb, idx); 2512 mapping = ace_map_tx_skb(ap, skb, skb, idx);
2513 flagsize = (skb->len << 16) | (BD_FLG_END); 2513 flagsize = (skb->len << 16) | (BD_FLG_END);
2514 if (skb->ip_summed == CHECKSUM_HW) 2514 if (skb->ip_summed == CHECKSUM_PARTIAL)
2515 flagsize |= BD_FLG_TCP_UDP_SUM; 2515 flagsize |= BD_FLG_TCP_UDP_SUM;
2516#if ACENIC_DO_VLAN 2516#if ACENIC_DO_VLAN
2517 if (vlan_tx_tag_present(skb)) { 2517 if (vlan_tx_tag_present(skb)) {
@@ -2534,7 +2534,7 @@ restart:
2534 2534
2535 mapping = ace_map_tx_skb(ap, skb, NULL, idx); 2535 mapping = ace_map_tx_skb(ap, skb, NULL, idx);
2536 flagsize = (skb_headlen(skb) << 16); 2536 flagsize = (skb_headlen(skb) << 16);
2537 if (skb->ip_summed == CHECKSUM_HW) 2537 if (skb->ip_summed == CHECKSUM_PARTIAL)
2538 flagsize |= BD_FLG_TCP_UDP_SUM; 2538 flagsize |= BD_FLG_TCP_UDP_SUM;
2539#if ACENIC_DO_VLAN 2539#if ACENIC_DO_VLAN
2540 if (vlan_tx_tag_present(skb)) { 2540 if (vlan_tx_tag_present(skb)) {
@@ -2560,7 +2560,7 @@ restart:
2560 PCI_DMA_TODEVICE); 2560 PCI_DMA_TODEVICE);
2561 2561
2562 flagsize = (frag->size << 16); 2562 flagsize = (frag->size << 16);
2563 if (skb->ip_summed == CHECKSUM_HW) 2563 if (skb->ip_summed == CHECKSUM_PARTIAL)
2564 flagsize |= BD_FLG_TCP_UDP_SUM; 2564 flagsize |= BD_FLG_TCP_UDP_SUM;
2565 idx = (idx + 1) % ACE_TX_RING_ENTRIES(ap); 2565 idx = (idx + 1) % ACE_TX_RING_ENTRIES(ap);
2566 2566
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 652eb05a6c2d..7857b4630124 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -4423,7 +4423,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
4423 ring_prod = TX_RING_IDX(prod); 4423 ring_prod = TX_RING_IDX(prod);
4424 4424
4425 vlan_tag_flags = 0; 4425 vlan_tag_flags = 0;
4426 if (skb->ip_summed == CHECKSUM_HW) { 4426 if (skb->ip_summed == CHECKSUM_PARTIAL) {
4427 vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; 4427 vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM;
4428 } 4428 }
4429 4429
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index a31544ccb3c4..558fdb8ad2dc 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -2167,7 +2167,7 @@ end_copy_pkt:
2167 cas_page_unmap(addr); 2167 cas_page_unmap(addr);
2168 } 2168 }
2169 skb->csum = ntohs(i ^ 0xffff); 2169 skb->csum = ntohs(i ^ 0xffff);
2170 skb->ip_summed = CHECKSUM_HW; 2170 skb->ip_summed = CHECKSUM_COMPLETE;
2171 skb->protocol = eth_type_trans(skb, cp->dev); 2171 skb->protocol = eth_type_trans(skb, cp->dev);
2172 return len; 2172 return len;
2173} 2173}
@@ -2821,7 +2821,7 @@ static inline int cas_xmit_tx_ringN(struct cas *cp, int ring,
2821 } 2821 }
2822 2822
2823 ctrl = 0; 2823 ctrl = 0;
2824 if (skb->ip_summed == CHECKSUM_HW) { 2824 if (skb->ip_summed == CHECKSUM_PARTIAL) {
2825 u64 csum_start_off, csum_stuff_off; 2825 u64 csum_start_off, csum_stuff_off;
2826 2826
2827 csum_start_off = (u64) (skb->h.raw - skb->data); 2827 csum_start_off = (u64) (skb->h.raw - skb->data);
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 61b3754f50ff..ddd0bdb498f4 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -1470,9 +1470,9 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
1470 } 1470 }
1471 1471
1472 if (!(adapter->flags & UDP_CSUM_CAPABLE) && 1472 if (!(adapter->flags & UDP_CSUM_CAPABLE) &&
1473 skb->ip_summed == CHECKSUM_HW && 1473 skb->ip_summed == CHECKSUM_PARTIAL &&
1474 skb->nh.iph->protocol == IPPROTO_UDP) 1474 skb->nh.iph->protocol == IPPROTO_UDP)
1475 if (unlikely(skb_checksum_help(skb, 0))) { 1475 if (unlikely(skb_checksum_help(skb))) {
1476 dev_kfree_skb_any(skb); 1476 dev_kfree_skb_any(skb);
1477 return NETDEV_TX_OK; 1477 return NETDEV_TX_OK;
1478 } 1478 }
@@ -1495,11 +1495,11 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
1495 cpl = (struct cpl_tx_pkt *)__skb_push(skb, sizeof(*cpl)); 1495 cpl = (struct cpl_tx_pkt *)__skb_push(skb, sizeof(*cpl));
1496 cpl->opcode = CPL_TX_PKT; 1496 cpl->opcode = CPL_TX_PKT;
1497 cpl->ip_csum_dis = 1; /* SW calculates IP csum */ 1497 cpl->ip_csum_dis = 1; /* SW calculates IP csum */
1498 cpl->l4_csum_dis = skb->ip_summed == CHECKSUM_HW ? 0 : 1; 1498 cpl->l4_csum_dis = skb->ip_summed == CHECKSUM_PARTIAL ? 0 : 1;
1499 /* the length field isn't used so don't bother setting it */ 1499 /* the length field isn't used so don't bother setting it */
1500 1500
1501 st->tx_cso += (skb->ip_summed == CHECKSUM_HW); 1501 st->tx_cso += (skb->ip_summed == CHECKSUM_PARTIAL);
1502 sge->stats.tx_do_cksum += (skb->ip_summed == CHECKSUM_HW); 1502 sge->stats.tx_do_cksum += (skb->ip_summed == CHECKSUM_PARTIAL);
1503 sge->stats.tx_reg_pkts++; 1503 sge->stats.tx_reg_pkts++;
1504 } 1504 }
1505 cpl->iff = dev->if_port; 1505 cpl->iff = dev->if_port;
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
index 402961e68c89..b74e67654764 100644
--- a/drivers/net/dl2k.c
+++ b/drivers/net/dl2k.c
@@ -611,7 +611,7 @@ start_xmit (struct sk_buff *skb, struct net_device *dev)
611 txdesc = &np->tx_ring[entry]; 611 txdesc = &np->tx_ring[entry];
612 612
613#if 0 613#if 0
614 if (skb->ip_summed == CHECKSUM_HW) { 614 if (skb->ip_summed == CHECKSUM_PARTIAL) {
615 txdesc->status |= 615 txdesc->status |=
616 cpu_to_le64 (TCPChecksumEnable | UDPChecksumEnable | 616 cpu_to_le64 (TCPChecksumEnable | UDPChecksumEnable |
617 IPChecksumEnable); 617 IPChecksumEnable);
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 98ef9f85482f..2ab9f96f5dab 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2600,7 +2600,7 @@ e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring,
2600 unsigned int i; 2600 unsigned int i;
2601 uint8_t css; 2601 uint8_t css;
2602 2602
2603 if (likely(skb->ip_summed == CHECKSUM_HW)) { 2603 if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
2604 css = skb->h.raw - skb->data; 2604 css = skb->h.raw - skb->data;
2605 2605
2606 i = tx_ring->next_to_use; 2606 i = tx_ring->next_to_use;
@@ -2927,11 +2927,11 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
2927 } 2927 }
2928 2928
2929 /* reserve a descriptor for the offload context */ 2929 /* reserve a descriptor for the offload context */
2930 if ((mss) || (skb->ip_summed == CHECKSUM_HW)) 2930 if ((mss) || (skb->ip_summed == CHECKSUM_PARTIAL))
2931 count++; 2931 count++;
2932 count++; 2932 count++;
2933#else 2933#else
2934 if (skb->ip_summed == CHECKSUM_HW) 2934 if (skb->ip_summed == CHECKSUM_PARTIAL)
2935 count++; 2935 count++;
2936#endif 2936#endif
2937 2937
@@ -3608,7 +3608,7 @@ e1000_rx_checksum(struct e1000_adapter *adapter,
3608 */ 3608 */
3609 csum = ntohl(csum ^ 0xFFFF); 3609 csum = ntohl(csum ^ 0xFFFF);
3610 skb->csum = csum; 3610 skb->csum = csum;
3611 skb->ip_summed = CHECKSUM_HW; 3611 skb->ip_summed = CHECKSUM_COMPLETE;
3612 } 3612 }
3613 adapter->hw_csum_good++; 3613 adapter->hw_csum_good++;
3614} 3614}
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 11b8f1b43dd5..32cacf115f75 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -1503,7 +1503,8 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
1503 tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->gso_size << NV_TX2_TSO_SHIFT); 1503 tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->gso_size << NV_TX2_TSO_SHIFT);
1504 else 1504 else
1505#endif 1505#endif
1506 tx_flags_extra = (skb->ip_summed == CHECKSUM_HW ? (NV_TX2_CHECKSUM_L3|NV_TX2_CHECKSUM_L4) : 0); 1506 tx_flags_extra = skb->ip_summed == CHECKSUM_PARTIAL ?
1507 NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0;
1507 1508
1508 /* vlan tag */ 1509 /* vlan tag */
1509 if (np->vlangrp && vlan_tx_tag_present(skb)) { 1510 if (np->vlangrp && vlan_tx_tag_present(skb)) {
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index ebbbd6ca6204..ba960913c034 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -947,7 +947,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
947 947
948 /* Set up checksumming */ 948 /* Set up checksumming */
949 if (likely((dev->features & NETIF_F_IP_CSUM) 949 if (likely((dev->features & NETIF_F_IP_CSUM)
950 && (CHECKSUM_HW == skb->ip_summed))) { 950 && (CHECKSUM_PARTIAL == skb->ip_summed))) {
951 fcb = gfar_add_fcb(skb, txbdp); 951 fcb = gfar_add_fcb(skb, txbdp);
952 status |= TXBD_TOE; 952 status |= TXBD_TOE;
953 gfar_tx_checksum(skb, fcb); 953 gfar_tx_checksum(skb, fcb);
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
index 409c6aab0411..763373ae9666 100644
--- a/drivers/net/hamachi.c
+++ b/drivers/net/hamachi.c
@@ -1648,7 +1648,7 @@ static int hamachi_rx(struct net_device *dev)
1648 * could do the pseudo myself and return 1648 * could do the pseudo myself and return
1649 * CHECKSUM_UNNECESSARY 1649 * CHECKSUM_UNNECESSARY
1650 */ 1650 */
1651 skb->ip_summed = CHECKSUM_HW; 1651 skb->ip_summed = CHECKSUM_COMPLETE;
1652 } 1652 }
1653 } 1653 }
1654 } 1654 }
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
index 82468e2dc799..57e214d85e9a 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -1036,7 +1036,7 @@ static inline u16 emac_tx_csum(struct ocp_enet_private *dev,
1036 struct sk_buff *skb) 1036 struct sk_buff *skb)
1037{ 1037{
1038#if defined(CONFIG_IBM_EMAC_TAH) 1038#if defined(CONFIG_IBM_EMAC_TAH)
1039 if (skb->ip_summed == CHECKSUM_HW) { 1039 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1040 ++dev->stats.tx_packets_csum; 1040 ++dev->stats.tx_packets_csum;
1041 return EMAC_TX_CTRL_TAH_CSUM; 1041 return EMAC_TX_CTRL_TAH_CSUM;
1042 } 1042 }
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 68d8af7df08e..65f897ddb920 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -1387,7 +1387,7 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev)
1387 * MAC header which should not be summed and the TCP/UDP pseudo headers 1387 * MAC header which should not be summed and the TCP/UDP pseudo headers
1388 * manually. 1388 * manually.
1389 */ 1389 */
1390 if (skb->ip_summed == CHECKSUM_HW) { 1390 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1391 int proto = ntohs(skb->nh.iph->protocol); 1391 int proto = ntohs(skb->nh.iph->protocol);
1392 unsigned int csoff; 1392 unsigned int csoff;
1393 struct iphdr *ih = skb->nh.iph; 1393 struct iphdr *ih = skb->nh.iph;
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 7bbd447289b5..9405b44f3214 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -1232,7 +1232,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb)
1232 unsigned int i; 1232 unsigned int i;
1233 uint8_t css, cso; 1233 uint8_t css, cso;
1234 1234
1235 if(likely(skb->ip_summed == CHECKSUM_HW)) { 1235 if(likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
1236 css = skb->h.raw - skb->data; 1236 css = skb->h.raw - skb->data;
1237 cso = (skb->h.raw + skb->csum) - skb->data; 1237 cso = (skb->h.raw + skb->csum) - skb->data;
1238 1238
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index eeab1df5bef3..38df58fdb358 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1147,7 +1147,7 @@ static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp,
1147 desc->byte_cnt = length; 1147 desc->byte_cnt = length;
1148 desc->buf_ptr = dma_map_single(NULL, skb->data, length, DMA_TO_DEVICE); 1148 desc->buf_ptr = dma_map_single(NULL, skb->data, length, DMA_TO_DEVICE);
1149 1149
1150 if (skb->ip_summed == CHECKSUM_HW) { 1150 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1151 BUG_ON(skb->protocol != ETH_P_IP); 1151 BUG_ON(skb->protocol != ETH_P_IP);
1152 1152
1153 cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM | 1153 cmd_sts |= ETH_GEN_TCP_UDP_CHECKSUM |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 9bdd43ab3573..9f16681d0e7e 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -930,7 +930,7 @@ static inline void myri10ge_vlan_ip_csum(struct sk_buff *skb, u16 hw_csum)
930 (vh->h_vlan_encapsulated_proto == htons(ETH_P_IP) || 930 (vh->h_vlan_encapsulated_proto == htons(ETH_P_IP) ||
931 vh->h_vlan_encapsulated_proto == htons(ETH_P_IPV6))) { 931 vh->h_vlan_encapsulated_proto == htons(ETH_P_IPV6))) {
932 skb->csum = hw_csum; 932 skb->csum = hw_csum;
933 skb->ip_summed = CHECKSUM_HW; 933 skb->ip_summed = CHECKSUM_COMPLETE;
934 } 934 }
935} 935}
936 936
@@ -973,7 +973,7 @@ myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx,
973 if ((skb->protocol == ntohs(ETH_P_IP)) || 973 if ((skb->protocol == ntohs(ETH_P_IP)) ||
974 (skb->protocol == ntohs(ETH_P_IPV6))) { 974 (skb->protocol == ntohs(ETH_P_IPV6))) {
975 skb->csum = ntohs((u16) csum); 975 skb->csum = ntohs((u16) csum);
976 skb->ip_summed = CHECKSUM_HW; 976 skb->ip_summed = CHECKSUM_COMPLETE;
977 } else 977 } else
978 myri10ge_vlan_ip_csum(skb, ntohs((u16) csum)); 978 myri10ge_vlan_ip_csum(skb, ntohs((u16) csum));
979 } 979 }
@@ -1897,13 +1897,13 @@ again:
1897 pseudo_hdr_offset = 0; 1897 pseudo_hdr_offset = 0;
1898 odd_flag = 0; 1898 odd_flag = 0;
1899 flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST); 1899 flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST);
1900 if (likely(skb->ip_summed == CHECKSUM_HW)) { 1900 if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
1901 cksum_offset = (skb->h.raw - skb->data); 1901 cksum_offset = (skb->h.raw - skb->data);
1902 pseudo_hdr_offset = (skb->h.raw + skb->csum) - skb->data; 1902 pseudo_hdr_offset = (skb->h.raw + skb->csum) - skb->data;
1903 /* If the headers are excessively large, then we must 1903 /* If the headers are excessively large, then we must
1904 * fall back to a software checksum */ 1904 * fall back to a software checksum */
1905 if (unlikely(cksum_offset > 255 || pseudo_hdr_offset > 127)) { 1905 if (unlikely(cksum_offset > 255 || pseudo_hdr_offset > 127)) {
1906 if (skb_checksum_help(skb, 0)) 1906 if (skb_checksum_help(skb))
1907 goto drop; 1907 goto drop;
1908 cksum_offset = 0; 1908 cksum_offset = 0;
1909 pseudo_hdr_offset = 0; 1909 pseudo_hdr_offset = 0;
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 0e76859c90a2..5143f5dbb2e5 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1153,7 +1153,7 @@ again:
1153 if (!nr_frags) 1153 if (!nr_frags)
1154 frag = NULL; 1154 frag = NULL;
1155 extsts = 0; 1155 extsts = 0;
1156 if (skb->ip_summed == CHECKSUM_HW) { 1156 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1157 extsts |= EXTSTS_IPPKT; 1157 extsts |= EXTSTS_IPPKT;
1158 if (IPPROTO_TCP == skb->nh.iph->protocol) 1158 if (IPPROTO_TCP == skb->nh.iph->protocol)
1159 extsts |= EXTSTS_TCPPKT; 1159 extsts |= EXTSTS_TCPPKT;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 4c2f575faad7..d9b960aa9b0d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2169,7 +2169,7 @@ static inline u32 rtl8169_tso_csum(struct sk_buff *skb, struct net_device *dev)
2169 if (mss) 2169 if (mss)
2170 return LargeSend | ((mss & MSSMask) << MSSShift); 2170 return LargeSend | ((mss & MSSMask) << MSSShift);
2171 } 2171 }
2172 if (skb->ip_summed == CHECKSUM_HW) { 2172 if (skb->ip_summed == CHECKSUM_PARTIAL) {
2173 const struct iphdr *ip = skb->nh.iph; 2173 const struct iphdr *ip = skb->nh.iph;
2174 2174
2175 if (ip->protocol == IPPROTO_TCP) 2175 if (ip->protocol == IPPROTO_TCP)
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index e72e0e099060..5b3713f622d7 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3893,7 +3893,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3893 txdp->Control_1 |= TXD_TCP_LSO_MSS(s2io_tcp_mss(skb)); 3893 txdp->Control_1 |= TXD_TCP_LSO_MSS(s2io_tcp_mss(skb));
3894 } 3894 }
3895#endif 3895#endif
3896 if (skb->ip_summed == CHECKSUM_HW) { 3896 if (skb->ip_summed == CHECKSUM_PARTIAL) {
3897 txdp->Control_2 |= 3897 txdp->Control_2 |=
3898 (TXD_TX_CKO_IPV4_EN | TXD_TX_CKO_TCP_EN | 3898 (TXD_TX_CKO_IPV4_EN | TXD_TX_CKO_TCP_EN |
3899 TXD_TX_CKO_UDP_EN); 3899 TXD_TX_CKO_UDP_EN);
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index ee62845d3ac9..eb3b35180c2f 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -1559,7 +1559,7 @@ struct sk_buff *pMessage) /* pointer to send-message */
1559 pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32); 1559 pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32);
1560 pTxd->pMBuf = pMessage; 1560 pTxd->pMBuf = pMessage;
1561 1561
1562 if (pMessage->ip_summed == CHECKSUM_HW) { 1562 if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
1563 u16 hdrlen = pMessage->h.raw - pMessage->data; 1563 u16 hdrlen = pMessage->h.raw - pMessage->data;
1564 u16 offset = hdrlen + pMessage->csum; 1564 u16 offset = hdrlen + pMessage->csum;
1565 1565
@@ -1678,7 +1678,7 @@ struct sk_buff *pMessage) /* pointer to send-message */
1678 /* 1678 /*
1679 ** Does the HW need to evaluate checksum for TCP or UDP packets? 1679 ** Does the HW need to evaluate checksum for TCP or UDP packets?
1680 */ 1680 */
1681 if (pMessage->ip_summed == CHECKSUM_HW) { 1681 if (pMessage->ip_summed == CHECKSUM_PARTIAL) {
1682 u16 hdrlen = pMessage->h.raw - pMessage->data; 1682 u16 hdrlen = pMessage->h.raw - pMessage->data;
1683 u16 offset = hdrlen + pMessage->csum; 1683 u16 offset = hdrlen + pMessage->csum;
1684 1684
@@ -2158,7 +2158,7 @@ rx_start:
2158 2158
2159#ifdef USE_SK_RX_CHECKSUM 2159#ifdef USE_SK_RX_CHECKSUM
2160 pMsg->csum = pRxd->TcpSums & 0xffff; 2160 pMsg->csum = pRxd->TcpSums & 0xffff;
2161 pMsg->ip_summed = CHECKSUM_HW; 2161 pMsg->ip_summed = CHECKSUM_COMPLETE;
2162#else 2162#else
2163 pMsg->ip_summed = CHECKSUM_NONE; 2163 pMsg->ip_summed = CHECKSUM_NONE;
2164#endif 2164#endif
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index ad878dfddef4..b3d6fa3d6df4 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2338,7 +2338,7 @@ static int skge_xmit_frame(struct sk_buff *skb, struct net_device *dev)
2338 td->dma_lo = map; 2338 td->dma_lo = map;
2339 td->dma_hi = map >> 32; 2339 td->dma_hi = map >> 32;
2340 2340
2341 if (skb->ip_summed == CHECKSUM_HW) { 2341 if (skb->ip_summed == CHECKSUM_PARTIAL) {
2342 int offset = skb->h.raw - skb->data; 2342 int offset = skb->h.raw - skb->data;
2343 2343
2344 /* This seems backwards, but it is what the sk98lin 2344 /* This seems backwards, but it is what the sk98lin
@@ -2642,7 +2642,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge,
2642 skb->dev = skge->netdev; 2642 skb->dev = skge->netdev;
2643 if (skge->rx_csum) { 2643 if (skge->rx_csum) {
2644 skb->csum = csum; 2644 skb->csum = csum;
2645 skb->ip_summed = CHECKSUM_HW; 2645 skb->ip_summed = CHECKSUM_COMPLETE;
2646 } 2646 }
2647 2647
2648 skb->protocol = eth_type_trans(skb, skge->netdev); 2648 skb->protocol = eth_type_trans(skb, skge->netdev);
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 933e87f1cc68..8e92566b587e 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1163,7 +1163,7 @@ static unsigned tx_le_req(const struct sk_buff *skb)
1163 if (skb_is_gso(skb)) 1163 if (skb_is_gso(skb))
1164 ++count; 1164 ++count;
1165 1165
1166 if (skb->ip_summed == CHECKSUM_HW) 1166 if (skb->ip_summed == CHECKSUM_PARTIAL)
1167 ++count; 1167 ++count;
1168 1168
1169 return count; 1169 return count;
@@ -1272,7 +1272,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
1272#endif 1272#endif
1273 1273
1274 /* Handle TCP checksum offload */ 1274 /* Handle TCP checksum offload */
1275 if (skb->ip_summed == CHECKSUM_HW) { 1275 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1276 u16 hdr = skb->h.raw - skb->data; 1276 u16 hdr = skb->h.raw - skb->data;
1277 u16 offset = hdr + skb->csum; 1277 u16 offset = hdr + skb->csum;
1278 1278
@@ -2000,7 +2000,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
2000#endif 2000#endif
2001 case OP_RXCHKS: 2001 case OP_RXCHKS:
2002 skb = sky2->rx_ring[sky2->rx_next].skb; 2002 skb = sky2->rx_ring[sky2->rx_next].skb;
2003 skb->ip_summed = CHECKSUM_HW; 2003 skb->ip_summed = CHECKSUM_COMPLETE;
2004 skb->csum = le16_to_cpu(status); 2004 skb->csum = le16_to_cpu(status);
2005 break; 2005 break;
2006 2006
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index c0a62b00ffc8..2607aa51d8e0 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1230,7 +1230,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
1230 } 1230 }
1231 1231
1232#if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE) 1232#if defined(ZEROCOPY) && defined(HAS_BROKEN_FIRMWARE)
1233 if (skb->ip_summed == CHECKSUM_HW) { 1233 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1234 if (skb_padto(skb, (skb->len + PADDING_MASK) & ~PADDING_MASK)) 1234 if (skb_padto(skb, (skb->len + PADDING_MASK) & ~PADDING_MASK))
1235 return NETDEV_TX_OK; 1235 return NETDEV_TX_OK;
1236 } 1236 }
@@ -1252,7 +1252,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev)
1252 status |= TxDescIntr; 1252 status |= TxDescIntr;
1253 np->reap_tx = 0; 1253 np->reap_tx = 0;
1254 } 1254 }
1255 if (skb->ip_summed == CHECKSUM_HW) { 1255 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1256 status |= TxCalTCP; 1256 status |= TxCalTCP;
1257 np->stats.tx_compressed++; 1257 np->stats.tx_compressed++;
1258 } 1258 }
@@ -1499,7 +1499,7 @@ static int __netdev_rx(struct net_device *dev, int *quota)
1499 * Until then, the printk stays. :-) -Ion 1499 * Until then, the printk stays. :-) -Ion
1500 */ 1500 */
1501 else if (le16_to_cpu(desc->status2) & 0x0040) { 1501 else if (le16_to_cpu(desc->status2) & 0x0040) {
1502 skb->ip_summed = CHECKSUM_HW; 1502 skb->ip_summed = CHECKSUM_COMPLETE;
1503 skb->csum = le16_to_cpu(desc->csum); 1503 skb->csum = le16_to_cpu(desc->csum);
1504 printk(KERN_DEBUG "%s: checksum_hw, status2 = %#x\n", dev->name, le16_to_cpu(desc->status2)); 1504 printk(KERN_DEBUG "%s: checksum_hw, status2 = %#x\n", dev->name, le16_to_cpu(desc->status2));
1505 } 1505 }
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index d7b1d1882cab..b388651b7836 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -855,7 +855,7 @@ static int gem_rx(struct gem *gp, int work_to_do)
855 } 855 }
856 856
857 skb->csum = ntohs((status & RXDCTRL_TCPCSUM) ^ 0xffff); 857 skb->csum = ntohs((status & RXDCTRL_TCPCSUM) ^ 0xffff);
858 skb->ip_summed = CHECKSUM_HW; 858 skb->ip_summed = CHECKSUM_COMPLETE;
859 skb->protocol = eth_type_trans(skb, gp->dev); 859 skb->protocol = eth_type_trans(skb, gp->dev);
860 860
861 netif_receive_skb(skb); 861 netif_receive_skb(skb);
@@ -1026,7 +1026,7 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev)
1026 unsigned long flags; 1026 unsigned long flags;
1027 1027
1028 ctrl = 0; 1028 ctrl = 0;
1029 if (skb->ip_summed == CHECKSUM_HW) { 1029 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1030 u64 csum_start_off, csum_stuff_off; 1030 u64 csum_start_off, csum_stuff_off;
1031 1031
1032 csum_start_off = (u64) (skb->h.raw - skb->data); 1032 csum_start_off = (u64) (skb->h.raw - skb->data);
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index c6f5bc3c042f..17981da22730 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -1207,7 +1207,7 @@ static void happy_meal_transceiver_check(struct happy_meal *hp, void __iomem *tr
1207 * flags, thus: 1207 * flags, thus:
1208 * 1208 *
1209 * skb->csum = rxd->rx_flags & 0xffff; 1209 * skb->csum = rxd->rx_flags & 0xffff;
1210 * skb->ip_summed = CHECKSUM_HW; 1210 * skb->ip_summed = CHECKSUM_COMPLETE;
1211 * 1211 *
1212 * before sending off the skb to the protocols, and we are good as gold. 1212 * before sending off the skb to the protocols, and we are good as gold.
1213 */ 1213 */
@@ -2074,7 +2074,7 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
2074 2074
2075 /* This card is _fucking_ hot... */ 2075 /* This card is _fucking_ hot... */
2076 skb->csum = ntohs(csum ^ 0xffff); 2076 skb->csum = ntohs(csum ^ 0xffff);
2077 skb->ip_summed = CHECKSUM_HW; 2077 skb->ip_summed = CHECKSUM_COMPLETE;
2078 2078
2079 RXD(("len=%d csum=%4x]", len, csum)); 2079 RXD(("len=%d csum=%4x]", len, csum));
2080 skb->protocol = eth_type_trans(skb, dev); 2080 skb->protocol = eth_type_trans(skb, dev);
@@ -2268,7 +2268,7 @@ static int happy_meal_start_xmit(struct sk_buff *skb, struct net_device *dev)
2268 u32 tx_flags; 2268 u32 tx_flags;
2269 2269
2270 tx_flags = TXFLAG_OWN; 2270 tx_flags = TXFLAG_OWN;
2271 if (skb->ip_summed == CHECKSUM_HW) { 2271 if (skb->ip_summed == CHECKSUM_PARTIAL) {
2272 u32 csum_start_off, csum_stuff_off; 2272 u32 csum_start_off, csum_stuff_off;
2273 2273
2274 csum_start_off = (u32) (skb->h.raw - skb->data); 2274 csum_start_off = (u32) (skb->h.raw - skb->data);
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index eafabb253f08..6f5d3a38c582 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3851,11 +3851,11 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
3851 skb->h.th->check = 0; 3851 skb->h.th->check = 0;
3852 3852
3853 } 3853 }
3854 else if (skb->ip_summed == CHECKSUM_HW) 3854 else if (skb->ip_summed == CHECKSUM_PARTIAL)
3855 base_flags |= TXD_FLAG_TCPUDP_CSUM; 3855 base_flags |= TXD_FLAG_TCPUDP_CSUM;
3856#else 3856#else
3857 mss = 0; 3857 mss = 0;
3858 if (skb->ip_summed == CHECKSUM_HW) 3858 if (skb->ip_summed == CHECKSUM_PARTIAL)
3859 base_flags |= TXD_FLAG_TCPUDP_CSUM; 3859 base_flags |= TXD_FLAG_TCPUDP_CSUM;
3860#endif 3860#endif
3861#if TG3_VLAN_TAG_USED 3861#if TG3_VLAN_TAG_USED
@@ -3981,7 +3981,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev)
3981 3981
3982 entry = tp->tx_prod; 3982 entry = tp->tx_prod;
3983 base_flags = 0; 3983 base_flags = 0;
3984 if (skb->ip_summed == CHECKSUM_HW) 3984 if (skb->ip_summed == CHECKSUM_PARTIAL)
3985 base_flags |= TXD_FLAG_TCPUDP_CSUM; 3985 base_flags |= TXD_FLAG_TCPUDP_CSUM;
3986#if TG3_TSO_SUPPORT != 0 3986#if TG3_TSO_SUPPORT != 0
3987 mss = 0; 3987 mss = 0;
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 4103c37172f9..c6e601dc6bbc 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -830,7 +830,7 @@ typhoon_start_tx(struct sk_buff *skb, struct net_device *dev)
830 first_txd->addrHi = (u64)((unsigned long) skb) >> 32; 830 first_txd->addrHi = (u64)((unsigned long) skb) >> 32;
831 first_txd->processFlags = 0; 831 first_txd->processFlags = 0;
832 832
833 if(skb->ip_summed == CHECKSUM_HW) { 833 if(skb->ip_summed == CHECKSUM_PARTIAL) {
834 /* The 3XP will figure out if this is UDP/TCP */ 834 /* The 3XP will figure out if this is UDP/TCP */
835 first_txd->processFlags |= TYPHOON_TX_PF_TCP_CHKSUM; 835 first_txd->processFlags |= TYPHOON_TX_PF_TCP_CHKSUM;
836 first_txd->processFlags |= TYPHOON_TX_PF_UDP_CHKSUM; 836 first_txd->processFlags |= TYPHOON_TX_PF_UDP_CHKSUM;
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index ae971080e2e4..66547159bfd9 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -1230,7 +1230,7 @@ static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev)
1230 rp->tx_skbuff[entry] = skb; 1230 rp->tx_skbuff[entry] = skb;
1231 1231
1232 if ((rp->quirks & rqRhineI) && 1232 if ((rp->quirks & rqRhineI) &&
1233 (((unsigned long)skb->data & 3) || skb_shinfo(skb)->nr_frags != 0 || skb->ip_summed == CHECKSUM_HW)) { 1233 (((unsigned long)skb->data & 3) || skb_shinfo(skb)->nr_frags != 0 || skb->ip_summed == CHECKSUM_PARTIAL)) {
1234 /* Must use alignment buffer. */ 1234 /* Must use alignment buffer. */
1235 if (skb->len > PKT_BUF_SZ) { 1235 if (skb->len > PKT_BUF_SZ) {
1236 /* packet too long, drop it */ 1236 /* packet too long, drop it */
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index aa9cd92f46b2..f1e0c746a388 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -2002,7 +2002,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev)
2002 * Handle hardware checksum 2002 * Handle hardware checksum
2003 */ 2003 */
2004 if ((vptr->flags & VELOCITY_FLAGS_TX_CSUM) 2004 if ((vptr->flags & VELOCITY_FLAGS_TX_CSUM)
2005 && (skb->ip_summed == CHECKSUM_HW)) { 2005 && (skb->ip_summed == CHECKSUM_PARTIAL)) {
2006 struct iphdr *ip = skb->nh.iph; 2006 struct iphdr *ip = skb->nh.iph;
2007 if (ip->protocol == IPPROTO_TCP) 2007 if (ip->protocol == IPPROTO_TCP)
2008 td_ptr->tdesc1.TCR |= TCR0_TCPCK; 2008 td_ptr->tdesc1.TCR |= TCR0_TCPCK;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 50a4719512ed..4f2c2b6beb5e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -976,7 +976,7 @@ extern void dev_mcast_init(void);
976extern int netdev_max_backlog; 976extern int netdev_max_backlog;
977extern int weight_p; 977extern int weight_p;
978extern int netdev_set_master(struct net_device *dev, struct net_device *master); 978extern int netdev_set_master(struct net_device *dev, struct net_device *master);
979extern int skb_checksum_help(struct sk_buff *skb, int inward); 979extern int skb_checksum_help(struct sk_buff *skb);
980extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features); 980extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features);
981#ifdef CONFIG_BUG 981#ifdef CONFIG_BUG
982extern void netdev_rx_csum_fault(struct net_device *dev); 982extern void netdev_rx_csum_fault(struct net_device *dev);
@@ -1012,7 +1012,7 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
1012{ 1012{
1013 return skb_is_gso(skb) && 1013 return skb_is_gso(skb) &&
1014 (!skb_gso_ok(skb, dev->features) || 1014 (!skb_gso_ok(skb, dev->features) ||
1015 unlikely(skb->ip_summed != CHECKSUM_HW)); 1015 unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
1016} 1016}
1017 1017
1018/* On bonding slaves other than the currently active slave, suppress 1018/* On bonding slaves other than the currently active slave, suppress
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 755e9cddac47..85577a4ffa61 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -34,8 +34,9 @@
34#define HAVE_ALIGNABLE_SKB /* Ditto 8) */ 34#define HAVE_ALIGNABLE_SKB /* Ditto 8) */
35 35
36#define CHECKSUM_NONE 0 36#define CHECKSUM_NONE 0
37#define CHECKSUM_HW 1 37#define CHECKSUM_PARTIAL 1
38#define CHECKSUM_UNNECESSARY 2 38#define CHECKSUM_UNNECESSARY 2
39#define CHECKSUM_COMPLETE 3
39 40
40#define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \ 41#define SKB_DATA_ALIGN(X) (((X) + (SMP_CACHE_BYTES - 1)) & \
41 ~(SMP_CACHE_BYTES - 1)) 42 ~(SMP_CACHE_BYTES - 1))
@@ -56,17 +57,17 @@
56 * Apparently with secret goal to sell you new device, when you 57 * Apparently with secret goal to sell you new device, when you
57 * will add new protocol to your host. F.e. IPv6. 8) 58 * will add new protocol to your host. F.e. IPv6. 8)
58 * 59 *
59 * HW: the most generic way. Device supplied checksum of _all_ 60 * COMPLETE: the most generic way. Device supplied checksum of _all_
60 * the packet as seen by netif_rx in skb->csum. 61 * the packet as seen by netif_rx in skb->csum.
61 * NOTE: Even if device supports only some protocols, but 62 * NOTE: Even if device supports only some protocols, but
62 * is able to produce some skb->csum, it MUST use HW, 63 * is able to produce some skb->csum, it MUST use COMPLETE,
63 * not UNNECESSARY. 64 * not UNNECESSARY.
64 * 65 *
65 * B. Checksumming on output. 66 * B. Checksumming on output.
66 * 67 *
67 * NONE: skb is checksummed by protocol or csum is not required. 68 * NONE: skb is checksummed by protocol or csum is not required.
68 * 69 *
69 * HW: device is required to csum packet as seen by hard_start_xmit 70 * PARTIAL: device is required to csum packet as seen by hard_start_xmit
70 * from skb->h.raw to the end and to record the checksum 71 * from skb->h.raw to the end and to record the checksum
71 * at skb->h.raw+skb->csum. 72 * at skb->h.raw+skb->csum.
72 * 73 *
@@ -1261,14 +1262,14 @@ static inline int skb_linearize_cow(struct sk_buff *skb)
1261 * @len: length of data pulled 1262 * @len: length of data pulled
1262 * 1263 *
1263 * After doing a pull on a received packet, you need to call this to 1264 * After doing a pull on a received packet, you need to call this to
1264 * update the CHECKSUM_HW checksum, or set ip_summed to CHECKSUM_NONE 1265 * update the CHECKSUM_COMPLETE checksum, or set ip_summed to
1265 * so that it can be recomputed from scratch. 1266 * CHECKSUM_NONE so that it can be recomputed from scratch.
1266 */ 1267 */
1267 1268
1268static inline void skb_postpull_rcsum(struct sk_buff *skb, 1269static inline void skb_postpull_rcsum(struct sk_buff *skb,
1269 const void *start, unsigned int len) 1270 const void *start, unsigned int len)
1270{ 1271{
1271 if (skb->ip_summed == CHECKSUM_HW) 1272 if (skb->ip_summed == CHECKSUM_COMPLETE)
1272 skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0)); 1273 skb->csum = csum_sub(skb->csum, csum_partial(start, len, 0));
1273} 1274}
1274 1275
@@ -1287,7 +1288,7 @@ static inline int pskb_trim_rcsum(struct sk_buff *skb, unsigned int len)
1287{ 1288{
1288 if (likely(len >= skb->len)) 1289 if (likely(len >= skb->len))
1289 return 0; 1290 return 0;
1290 if (skb->ip_summed == CHECKSUM_HW) 1291 if (skb->ip_summed == CHECKSUM_COMPLETE)
1291 skb->ip_summed = CHECKSUM_NONE; 1292 skb->ip_summed = CHECKSUM_NONE;
1292 return __pskb_trim(skb, len); 1293 return __pskb_trim(skb, len);
1293} 1294}
diff --git a/net/core/datagram.c b/net/core/datagram.c
index aecddcc30401..f558c61aecc7 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -417,7 +417,7 @@ unsigned int __skb_checksum_complete(struct sk_buff *skb)
417 417
418 sum = (u16)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum)); 418 sum = (u16)csum_fold(skb_checksum(skb, 0, skb->len, skb->csum));
419 if (likely(!sum)) { 419 if (likely(!sum)) {
420 if (unlikely(skb->ip_summed == CHECKSUM_HW)) 420 if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE))
421 netdev_rx_csum_fault(skb->dev); 421 netdev_rx_csum_fault(skb->dev);
422 skb->ip_summed = CHECKSUM_UNNECESSARY; 422 skb->ip_summed = CHECKSUM_UNNECESSARY;
423 } 423 }
@@ -462,7 +462,7 @@ int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb,
462 goto fault; 462 goto fault;
463 if ((unsigned short)csum_fold(csum)) 463 if ((unsigned short)csum_fold(csum))
464 goto csum_error; 464 goto csum_error;
465 if (unlikely(skb->ip_summed == CHECKSUM_HW)) 465 if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE))
466 netdev_rx_csum_fault(skb->dev); 466 netdev_rx_csum_fault(skb->dev);
467 iov->iov_len -= chunk; 467 iov->iov_len -= chunk;
468 iov->iov_base += chunk; 468 iov->iov_base += chunk;
diff --git a/net/core/dev.c b/net/core/dev.c
index d4a1ec3bded5..fc82f6f6e1c1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1166,12 +1166,12 @@ EXPORT_SYMBOL(netif_device_attach);
1166 * Invalidate hardware checksum when packet is to be mangled, and 1166 * Invalidate hardware checksum when packet is to be mangled, and
1167 * complete checksum manually on outgoing path. 1167 * complete checksum manually on outgoing path.
1168 */ 1168 */
1169int skb_checksum_help(struct sk_buff *skb, int inward) 1169int skb_checksum_help(struct sk_buff *skb)
1170{ 1170{
1171 unsigned int csum; 1171 unsigned int csum;
1172 int ret = 0, offset = skb->h.raw - skb->data; 1172 int ret = 0, offset = skb->h.raw - skb->data;
1173 1173
1174 if (inward) 1174 if (skb->ip_summed == CHECKSUM_COMPLETE)
1175 goto out_set_summed; 1175 goto out_set_summed;
1176 1176
1177 if (unlikely(skb_shinfo(skb)->gso_size)) { 1177 if (unlikely(skb_shinfo(skb)->gso_size)) {
@@ -1223,7 +1223,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
1223 skb->mac_len = skb->nh.raw - skb->data; 1223 skb->mac_len = skb->nh.raw - skb->data;
1224 __skb_pull(skb, skb->mac_len); 1224 __skb_pull(skb, skb->mac_len);
1225 1225
1226 if (unlikely(skb->ip_summed != CHECKSUM_HW)) { 1226 if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
1227 if (skb_header_cloned(skb) && 1227 if (skb_header_cloned(skb) &&
1228 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) 1228 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
1229 return ERR_PTR(err); 1229 return ERR_PTR(err);
@@ -1232,7 +1232,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
1232 rcu_read_lock(); 1232 rcu_read_lock();
1233 list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type) & 15], list) { 1233 list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type) & 15], list) {
1234 if (ptype->type == type && !ptype->dev && ptype->gso_segment) { 1234 if (ptype->type == type && !ptype->dev && ptype->gso_segment) {
1235 if (unlikely(skb->ip_summed != CHECKSUM_HW)) { 1235 if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
1236 err = ptype->gso_send_check(skb); 1236 err = ptype->gso_send_check(skb);
1237 segs = ERR_PTR(err); 1237 segs = ERR_PTR(err);
1238 if (err || skb_gso_ok(skb, features)) 1238 if (err || skb_gso_ok(skb, features))
@@ -1444,11 +1444,11 @@ int dev_queue_xmit(struct sk_buff *skb)
1444 /* If packet is not checksummed and device does not support 1444 /* If packet is not checksummed and device does not support
1445 * checksumming for this protocol, complete checksumming here. 1445 * checksumming for this protocol, complete checksumming here.
1446 */ 1446 */
1447 if (skb->ip_summed == CHECKSUM_HW && 1447 if (skb->ip_summed == CHECKSUM_PARTIAL &&
1448 (!(dev->features & NETIF_F_GEN_CSUM) && 1448 (!(dev->features & NETIF_F_GEN_CSUM) &&
1449 (!(dev->features & NETIF_F_IP_CSUM) || 1449 (!(dev->features & NETIF_F_IP_CSUM) ||
1450 skb->protocol != htons(ETH_P_IP)))) 1450 skb->protocol != htons(ETH_P_IP))))
1451 if (skb_checksum_help(skb, 0)) 1451 if (skb_checksum_help(skb))
1452 goto out_kfree_skb; 1452 goto out_kfree_skb;
1453 1453
1454gso: 1454gso:
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 471da451cd48..ead5920c26d6 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -110,7 +110,7 @@ static int checksum_udp(struct sk_buff *skb, struct udphdr *uh,
110 110
111 psum = csum_tcpudp_nofold(saddr, daddr, ulen, IPPROTO_UDP, 0); 111 psum = csum_tcpudp_nofold(saddr, daddr, ulen, IPPROTO_UDP, 0);
112 112
113 if (skb->ip_summed == CHECKSUM_HW && 113 if (skb->ip_summed == CHECKSUM_COMPLETE &&
114 !(u16)csum_fold(csum_add(psum, skb->csum))) 114 !(u16)csum_fold(csum_add(psum, skb->csum)))
115 return 0; 115 return 0;
116 116
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c54f3664bce5..8a476f1956e5 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1397,7 +1397,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
1397 unsigned int csum; 1397 unsigned int csum;
1398 long csstart; 1398 long csstart;
1399 1399
1400 if (skb->ip_summed == CHECKSUM_HW) 1400 if (skb->ip_summed == CHECKSUM_PARTIAL)
1401 csstart = skb->h.raw - skb->data; 1401 csstart = skb->h.raw - skb->data;
1402 else 1402 else
1403 csstart = skb_headlen(skb); 1403 csstart = skb_headlen(skb);
@@ -1411,7 +1411,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
1411 csum = skb_copy_and_csum_bits(skb, csstart, to + csstart, 1411 csum = skb_copy_and_csum_bits(skb, csstart, to + csstart,
1412 skb->len - csstart, 0); 1412 skb->len - csstart, 0);
1413 1413
1414 if (skb->ip_summed == CHECKSUM_HW) { 1414 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1415 long csstuff = csstart + skb->csum; 1415 long csstuff = csstart + skb->csum;
1416 1416
1417 *((unsigned short *)(to + csstuff)) = csum_fold(csum); 1417 *((unsigned short *)(to + csstuff)) = csum_fold(csum);
@@ -1898,10 +1898,10 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
1898 * @len: length of data pulled 1898 * @len: length of data pulled
1899 * 1899 *
1900 * This function performs an skb_pull on the packet and updates 1900 * This function performs an skb_pull on the packet and updates
1901 * update the CHECKSUM_HW checksum. It should be used on receive 1901 * update the CHECKSUM_COMPLETE checksum. It should be used on
1902 * path processing instead of skb_pull unless you know that the 1902 * receive path processing instead of skb_pull unless you know
1903 * checksum difference is zero (e.g., a valid IP header) or you 1903 * that the checksum difference is zero (e.g., a valid IP header)
1904 * are setting ip_summed to CHECKSUM_NONE. 1904 * or you are setting ip_summed to CHECKSUM_NONE.
1905 */ 1905 */
1906unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len) 1906unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len)
1907{ 1907{
@@ -1994,7 +1994,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features)
1994 frag = skb_shinfo(nskb)->frags; 1994 frag = skb_shinfo(nskb)->frags;
1995 k = 0; 1995 k = 0;
1996 1996
1997 nskb->ip_summed = CHECKSUM_HW; 1997 nskb->ip_summed = CHECKSUM_PARTIAL;
1998 nskb->csum = skb->csum; 1998 nskb->csum = skb->csum;
1999 memcpy(skb_put(nskb, hsize), skb->data + offset, hsize); 1999 memcpy(skb_put(nskb, hsize), skb->data + offset, hsize);
2000 2000
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 6ad797c14163..6d223e5c6741 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -930,7 +930,7 @@ int icmp_rcv(struct sk_buff *skb)
930 ICMP_INC_STATS_BH(ICMP_MIB_INMSGS); 930 ICMP_INC_STATS_BH(ICMP_MIB_INMSGS);
931 931
932 switch (skb->ip_summed) { 932 switch (skb->ip_summed) {
933 case CHECKSUM_HW: 933 case CHECKSUM_COMPLETE:
934 if (!(u16)csum_fold(skb->csum)) 934 if (!(u16)csum_fold(skb->csum))
935 break; 935 break;
936 /* fall through */ 936 /* fall through */
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 8e8117c19e4d..7003e763d970 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -931,7 +931,7 @@ int igmp_rcv(struct sk_buff *skb)
931 goto drop; 931 goto drop;
932 932
933 switch (skb->ip_summed) { 933 switch (skb->ip_summed) {
934 case CHECKSUM_HW: 934 case CHECKSUM_COMPLETE:
935 if (!(u16)csum_fold(skb->csum)) 935 if (!(u16)csum_fold(skb->csum))
936 break; 936 break;
937 /* fall through */ 937 /* fall through */
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index b84b53a47526..8d7f107c2eef 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -665,7 +665,7 @@ static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev)
665 head->len += fp->len; 665 head->len += fp->len;
666 if (head->ip_summed != fp->ip_summed) 666 if (head->ip_summed != fp->ip_summed)
667 head->ip_summed = CHECKSUM_NONE; 667 head->ip_summed = CHECKSUM_NONE;
668 else if (head->ip_summed == CHECKSUM_HW) 668 else if (head->ip_summed == CHECKSUM_COMPLETE)
669 head->csum = csum_add(head->csum, fp->csum); 669 head->csum = csum_add(head->csum, fp->csum);
670 head->truesize += fp->truesize; 670 head->truesize += fp->truesize;
671 atomic_sub(fp->truesize, &ip_frag_mem); 671 atomic_sub(fp->truesize, &ip_frag_mem);
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 0f9b3a31997b..e66f6ff2e198 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -576,7 +576,7 @@ static int ipgre_rcv(struct sk_buff *skb)
576 576
577 if (flags&GRE_CSUM) { 577 if (flags&GRE_CSUM) {
578 switch (skb->ip_summed) { 578 switch (skb->ip_summed) {
579 case CHECKSUM_HW: 579 case CHECKSUM_COMPLETE:
580 csum = (u16)csum_fold(skb->csum); 580 csum = (u16)csum_fold(skb->csum);
581 if (!csum) 581 if (!csum)
582 break; 582 break;
@@ -584,7 +584,7 @@ static int ipgre_rcv(struct sk_buff *skb)
584 case CHECKSUM_NONE: 584 case CHECKSUM_NONE:
585 skb->csum = 0; 585 skb->csum = 0;
586 csum = __skb_checksum_complete(skb); 586 csum = __skb_checksum_complete(skb);
587 skb->ip_summed = CHECKSUM_HW; 587 skb->ip_summed = CHECKSUM_COMPLETE;
588 } 588 }
589 offset += 4; 589 offset += 4;
590 } 590 }
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 308bdeac3455..1b9b6742ef77 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -680,7 +680,7 @@ ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk
680{ 680{
681 struct iovec *iov = from; 681 struct iovec *iov = from;
682 682
683 if (skb->ip_summed == CHECKSUM_HW) { 683 if (skb->ip_summed == CHECKSUM_PARTIAL) {
684 if (memcpy_fromiovecend(to, iov, offset, len) < 0) 684 if (memcpy_fromiovecend(to, iov, offset, len) < 0)
685 return -EFAULT; 685 return -EFAULT;
686 } else { 686 } else {
@@ -736,7 +736,7 @@ static inline int ip_ufo_append_data(struct sock *sk,
736 /* initialize protocol header pointer */ 736 /* initialize protocol header pointer */
737 skb->h.raw = skb->data + fragheaderlen; 737 skb->h.raw = skb->data + fragheaderlen;
738 738
739 skb->ip_summed = CHECKSUM_HW; 739 skb->ip_summed = CHECKSUM_PARTIAL;
740 skb->csum = 0; 740 skb->csum = 0;
741 sk->sk_sndmsg_off = 0; 741 sk->sk_sndmsg_off = 0;
742 } 742 }
@@ -844,7 +844,7 @@ int ip_append_data(struct sock *sk,
844 length + fragheaderlen <= mtu && 844 length + fragheaderlen <= mtu &&
845 rt->u.dst.dev->features & NETIF_F_ALL_CSUM && 845 rt->u.dst.dev->features & NETIF_F_ALL_CSUM &&
846 !exthdrlen) 846 !exthdrlen)
847 csummode = CHECKSUM_HW; 847 csummode = CHECKSUM_PARTIAL;
848 848
849 inet->cork.length += length; 849 inet->cork.length += length;
850 if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) && 850 if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) &&
diff --git a/net/ipv4/ipvs/ip_vs_proto_tcp.c b/net/ipv4/ipvs/ip_vs_proto_tcp.c
index bc28b1160a3a..820e8318d10d 100644
--- a/net/ipv4/ipvs/ip_vs_proto_tcp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_tcp.c
@@ -151,7 +151,7 @@ tcp_snat_handler(struct sk_buff **pskb,
151 /* Only port and addr are changed, do fast csum update */ 151 /* Only port and addr are changed, do fast csum update */
152 tcp_fast_csum_update(tcph, cp->daddr, cp->vaddr, 152 tcp_fast_csum_update(tcph, cp->daddr, cp->vaddr,
153 cp->dport, cp->vport); 153 cp->dport, cp->vport);
154 if ((*pskb)->ip_summed == CHECKSUM_HW) 154 if ((*pskb)->ip_summed == CHECKSUM_COMPLETE)
155 (*pskb)->ip_summed = CHECKSUM_NONE; 155 (*pskb)->ip_summed = CHECKSUM_NONE;
156 } else { 156 } else {
157 /* full checksum calculation */ 157 /* full checksum calculation */
@@ -204,7 +204,7 @@ tcp_dnat_handler(struct sk_buff **pskb,
204 /* Only port and addr are changed, do fast csum update */ 204 /* Only port and addr are changed, do fast csum update */
205 tcp_fast_csum_update(tcph, cp->vaddr, cp->daddr, 205 tcp_fast_csum_update(tcph, cp->vaddr, cp->daddr,
206 cp->vport, cp->dport); 206 cp->vport, cp->dport);
207 if ((*pskb)->ip_summed == CHECKSUM_HW) 207 if ((*pskb)->ip_summed == CHECKSUM_COMPLETE)
208 (*pskb)->ip_summed = CHECKSUM_NONE; 208 (*pskb)->ip_summed = CHECKSUM_NONE;
209 } else { 209 } else {
210 /* full checksum calculation */ 210 /* full checksum calculation */
@@ -229,7 +229,7 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
229 switch (skb->ip_summed) { 229 switch (skb->ip_summed) {
230 case CHECKSUM_NONE: 230 case CHECKSUM_NONE:
231 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); 231 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0);
232 case CHECKSUM_HW: 232 case CHECKSUM_COMPLETE:
233 if (csum_tcpudp_magic(skb->nh.iph->saddr, skb->nh.iph->daddr, 233 if (csum_tcpudp_magic(skb->nh.iph->saddr, skb->nh.iph->daddr,
234 skb->len - tcphoff, 234 skb->len - tcphoff,
235 skb->nh.iph->protocol, skb->csum)) { 235 skb->nh.iph->protocol, skb->csum)) {
@@ -239,7 +239,7 @@ tcp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
239 } 239 }
240 break; 240 break;
241 default: 241 default:
242 /* CHECKSUM_UNNECESSARY */ 242 /* No need to checksum. */
243 break; 243 break;
244 } 244 }
245 245
diff --git a/net/ipv4/ipvs/ip_vs_proto_udp.c b/net/ipv4/ipvs/ip_vs_proto_udp.c
index 89d9175d8f28..90c8166c0ec1 100644
--- a/net/ipv4/ipvs/ip_vs_proto_udp.c
+++ b/net/ipv4/ipvs/ip_vs_proto_udp.c
@@ -161,7 +161,7 @@ udp_snat_handler(struct sk_buff **pskb,
161 /* Only port and addr are changed, do fast csum update */ 161 /* Only port and addr are changed, do fast csum update */
162 udp_fast_csum_update(udph, cp->daddr, cp->vaddr, 162 udp_fast_csum_update(udph, cp->daddr, cp->vaddr,
163 cp->dport, cp->vport); 163 cp->dport, cp->vport);
164 if ((*pskb)->ip_summed == CHECKSUM_HW) 164 if ((*pskb)->ip_summed == CHECKSUM_COMPLETE)
165 (*pskb)->ip_summed = CHECKSUM_NONE; 165 (*pskb)->ip_summed = CHECKSUM_NONE;
166 } else { 166 } else {
167 /* full checksum calculation */ 167 /* full checksum calculation */
@@ -216,7 +216,7 @@ udp_dnat_handler(struct sk_buff **pskb,
216 /* Only port and addr are changed, do fast csum update */ 216 /* Only port and addr are changed, do fast csum update */
217 udp_fast_csum_update(udph, cp->vaddr, cp->daddr, 217 udp_fast_csum_update(udph, cp->vaddr, cp->daddr,
218 cp->vport, cp->dport); 218 cp->vport, cp->dport);
219 if ((*pskb)->ip_summed == CHECKSUM_HW) 219 if ((*pskb)->ip_summed == CHECKSUM_COMPLETE)
220 (*pskb)->ip_summed = CHECKSUM_NONE; 220 (*pskb)->ip_summed = CHECKSUM_NONE;
221 } else { 221 } else {
222 /* full checksum calculation */ 222 /* full checksum calculation */
@@ -250,7 +250,7 @@ udp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
250 case CHECKSUM_NONE: 250 case CHECKSUM_NONE:
251 skb->csum = skb_checksum(skb, udphoff, 251 skb->csum = skb_checksum(skb, udphoff,
252 skb->len - udphoff, 0); 252 skb->len - udphoff, 0);
253 case CHECKSUM_HW: 253 case CHECKSUM_COMPLETE:
254 if (csum_tcpudp_magic(skb->nh.iph->saddr, 254 if (csum_tcpudp_magic(skb->nh.iph->saddr,
255 skb->nh.iph->daddr, 255 skb->nh.iph->daddr,
256 skb->len - udphoff, 256 skb->len - udphoff,
@@ -262,7 +262,7 @@ udp_csum_check(struct sk_buff *skb, struct ip_vs_protocol *pp)
262 } 262 }
263 break; 263 break;
264 default: 264 default:
265 /* CHECKSUM_UNNECESSARY */ 265 /* No need to checksum. */
266 break; 266 break;
267 } 267 }
268 } 268 }
diff --git a/net/ipv4/netfilter.c b/net/ipv4/netfilter.c
index 6a9e34b794bc..f88347de21a9 100644
--- a/net/ipv4/netfilter.c
+++ b/net/ipv4/netfilter.c
@@ -168,7 +168,7 @@ unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook,
168 unsigned int csum = 0; 168 unsigned int csum = 0;
169 169
170 switch (skb->ip_summed) { 170 switch (skb->ip_summed) {
171 case CHECKSUM_HW: 171 case CHECKSUM_COMPLETE:
172 if (hook != NF_IP_PRE_ROUTING && hook != NF_IP_LOCAL_IN) 172 if (hook != NF_IP_PRE_ROUTING && hook != NF_IP_LOCAL_IN)
173 break; 173 break;
174 if ((protocol == 0 && !(u16)csum_fold(skb->csum)) || 174 if ((protocol == 0 && !(u16)csum_fold(skb->csum)) ||
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
index fb920e76ec10..9de81ff645d5 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
@@ -865,8 +865,7 @@ static int tcp_error(struct sk_buff *skb,
865 865
866 /* Checksum invalid? Ignore. 866 /* Checksum invalid? Ignore.
867 * We skip checking packets on the outgoing path 867 * We skip checking packets on the outgoing path
868 * because the semantic of CHECKSUM_HW is different there 868 * because it is assumed to be correct.
869 * and moreover root might send raw packets.
870 */ 869 */
871 /* FIXME: Source route IP option packets --RR */ 870 /* FIXME: Source route IP option packets --RR */
872 if (ip_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING && 871 if (ip_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING &&
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_udp.c b/net/ipv4/netfilter/ip_conntrack_proto_udp.c
index 9b2c16b4d2ff..e58e52f14553 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_udp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_udp.c
@@ -117,8 +117,7 @@ static int udp_error(struct sk_buff *skb, enum ip_conntrack_info *ctinfo,
117 117
118 /* Checksum invalid? Ignore. 118 /* Checksum invalid? Ignore.
119 * We skip checking packets on the outgoing path 119 * We skip checking packets on the outgoing path
120 * because the semantic of CHECKSUM_HW is different there 120 * because the checksum is assumed to be correct.
121 * and moreover root might send raw packets.
122 * FIXME: Source route IP option packets --RR */ 121 * FIXME: Source route IP option packets --RR */
123 if (ip_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING && 122 if (ip_conntrack_checksum && hooknum == NF_IP_PRE_ROUTING &&
124 nf_ip_checksum(skb, hooknum, iph->ihl * 4, IPPROTO_UDP)) { 123 nf_ip_checksum(skb, hooknum, iph->ihl * 4, IPPROTO_UDP)) {
diff --git a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c
index 17de077a7901..f4f00c816d87 100644
--- a/net/ipv4/netfilter/ip_nat_standalone.c
+++ b/net/ipv4/netfilter/ip_nat_standalone.c
@@ -111,8 +111,9 @@ ip_nat_fn(unsigned int hooknum,
111 & htons(IP_MF|IP_OFFSET))); 111 & htons(IP_MF|IP_OFFSET)));
112 112
113 /* If we had a hardware checksum before, it's now invalid */ 113 /* If we had a hardware checksum before, it's now invalid */
114 if ((*pskb)->ip_summed == CHECKSUM_HW) 114 if ((*pskb)->ip_summed == CHECKSUM_PARTIAL ||
115 if (skb_checksum_help(*pskb, (out == NULL))) 115 (*pskb)->ip_summed == CHECKSUM_COMPLETE)
116 if (skb_checksum_help(*pskb))
116 return NF_DROP; 117 return NF_DROP;
117 118
118 ct = ip_conntrack_get(*pskb, &ctinfo); 119 ct = ip_conntrack_get(*pskb, &ctinfo);
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index 198ac36db861..276a964ee6cf 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -208,9 +208,9 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
208 break; 208 break;
209 209
210 case IPQ_COPY_PACKET: 210 case IPQ_COPY_PACKET:
211 if (entry->skb->ip_summed == CHECKSUM_HW && 211 if ((entry->skb->ip_summed == CHECKSUM_PARTIAL ||
212 (*errp = skb_checksum_help(entry->skb, 212 entry->skb->ip_summed == CHECKSUM_COMPLETE) &&
213 entry->info->outdev == NULL))) { 213 (*errp = skb_checksum_help(entry->skb))) {
214 read_unlock_bh(&queue_lock); 214 read_unlock_bh(&queue_lock);
215 return NULL; 215 return NULL;
216 } 216 }
diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
index 4adf5c9d34f5..4ec43f98fe49 100644
--- a/net/ipv4/netfilter/ipt_ECN.c
+++ b/net/ipv4/netfilter/ipt_ECN.c
@@ -49,7 +49,7 @@ set_ect_ip(struct sk_buff **pskb, const struct ipt_ECN_info *einfo)
49 49
50/* Return 0 if there was an error. */ 50/* Return 0 if there was an error. */
51static inline int 51static inline int
52set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward) 52set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo)
53{ 53{
54 struct tcphdr _tcph, *tcph; 54 struct tcphdr _tcph, *tcph;
55 u_int16_t diffs[2]; 55 u_int16_t diffs[2];
@@ -70,8 +70,9 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
70 return 0; 70 return 0;
71 tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4; 71 tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4;
72 72
73 if ((*pskb)->ip_summed == CHECKSUM_HW && 73 if (((*pskb)->ip_summed == CHECKSUM_PARTIAL ||
74 skb_checksum_help(*pskb, inward)) 74 (*pskb)->ip_summed == CHECKSUM_COMPLETE) &&
75 skb_checksum_help(*pskb))
75 return 0; 76 return 0;
76 77
77 diffs[0] = ((u_int16_t *)tcph)[6]; 78 diffs[0] = ((u_int16_t *)tcph)[6];
@@ -106,7 +107,7 @@ target(struct sk_buff **pskb,
106 107
107 if (einfo->operation & (IPT_ECN_OP_SET_ECE | IPT_ECN_OP_SET_CWR) 108 if (einfo->operation & (IPT_ECN_OP_SET_ECE | IPT_ECN_OP_SET_CWR)
108 && (*pskb)->nh.iph->protocol == IPPROTO_TCP) 109 && (*pskb)->nh.iph->protocol == IPPROTO_TCP)
109 if (!set_ect_tcp(pskb, einfo, (out == NULL))) 110 if (!set_ect_tcp(pskb, einfo))
110 return NF_DROP; 111 return NF_DROP;
111 112
112 return IPT_CONTINUE; 113 return IPT_CONTINUE;
diff --git a/net/ipv4/netfilter/ipt_TCPMSS.c b/net/ipv4/netfilter/ipt_TCPMSS.c
index ef2fe5b3f0d8..c998dc0fcd15 100644
--- a/net/ipv4/netfilter/ipt_TCPMSS.c
+++ b/net/ipv4/netfilter/ipt_TCPMSS.c
@@ -62,8 +62,9 @@ ipt_tcpmss_target(struct sk_buff **pskb,
62 if (!skb_make_writable(pskb, (*pskb)->len)) 62 if (!skb_make_writable(pskb, (*pskb)->len))
63 return NF_DROP; 63 return NF_DROP;
64 64
65 if ((*pskb)->ip_summed == CHECKSUM_HW && 65 if (((*pskb)->ip_summed == CHECKSUM_PARTIAL ||
66 skb_checksum_help(*pskb, out == NULL)) 66 (*pskb)->ip_summed == CHECKSUM_COMPLETE) &&
67 skb_checksum_help(*pskb))
67 return NF_DROP; 68 return NF_DROP;
68 69
69 iph = (*pskb)->nh.iph; 70 iph = (*pskb)->nh.iph;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 934396bb1376..b0124e69ab38 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -568,7 +568,7 @@ new_segment:
568 skb->truesize += copy; 568 skb->truesize += copy;
569 sk->sk_wmem_queued += copy; 569 sk->sk_wmem_queued += copy;
570 sk->sk_forward_alloc -= copy; 570 sk->sk_forward_alloc -= copy;
571 skb->ip_summed = CHECKSUM_HW; 571 skb->ip_summed = CHECKSUM_PARTIAL;
572 tp->write_seq += copy; 572 tp->write_seq += copy;
573 TCP_SKB_CB(skb)->end_seq += copy; 573 TCP_SKB_CB(skb)->end_seq += copy;
574 skb_shinfo(skb)->gso_segs = 0; 574 skb_shinfo(skb)->gso_segs = 0;
@@ -723,7 +723,7 @@ new_segment:
723 * Check whether we can use HW checksum. 723 * Check whether we can use HW checksum.
724 */ 724 */
725 if (sk->sk_route_caps & NETIF_F_ALL_CSUM) 725 if (sk->sk_route_caps & NETIF_F_ALL_CSUM)
726 skb->ip_summed = CHECKSUM_HW; 726 skb->ip_summed = CHECKSUM_PARTIAL;
727 727
728 skb_entail(sk, tp, skb); 728 skb_entail(sk, tp, skb);
729 copy = size_goal; 729 copy = size_goal;
@@ -2205,7 +2205,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2205 th->fin = th->psh = 0; 2205 th->fin = th->psh = 0;
2206 2206
2207 th->check = ~csum_fold(th->check + delta); 2207 th->check = ~csum_fold(th->check + delta);
2208 if (skb->ip_summed != CHECKSUM_HW) 2208 if (skb->ip_summed != CHECKSUM_PARTIAL)
2209 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2209 th->check = csum_fold(csum_partial(skb->h.raw, thlen,
2210 skb->csum)); 2210 skb->csum));
2211 2211
@@ -2219,7 +2219,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2219 2219
2220 delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len); 2220 delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
2221 th->check = ~csum_fold(th->check + delta); 2221 th->check = ~csum_fold(th->check + delta);
2222 if (skb->ip_summed != CHECKSUM_HW) 2222 if (skb->ip_summed != CHECKSUM_PARTIAL)
2223 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2223 th->check = csum_fold(csum_partial(skb->h.raw, thlen,
2224 skb->csum)); 2224 skb->csum));
2225 2225
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 43f6740244f8..b2aa512a30e9 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -484,7 +484,7 @@ void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb)
484 struct inet_sock *inet = inet_sk(sk); 484 struct inet_sock *inet = inet_sk(sk);
485 struct tcphdr *th = skb->h.th; 485 struct tcphdr *th = skb->h.th;
486 486
487 if (skb->ip_summed == CHECKSUM_HW) { 487 if (skb->ip_summed == CHECKSUM_PARTIAL) {
488 th->check = ~tcp_v4_check(th, len, inet->saddr, inet->daddr, 0); 488 th->check = ~tcp_v4_check(th, len, inet->saddr, inet->daddr, 0);
489 skb->csum = offsetof(struct tcphdr, check); 489 skb->csum = offsetof(struct tcphdr, check);
490 } else { 490 } else {
@@ -509,7 +509,7 @@ int tcp_v4_gso_send_check(struct sk_buff *skb)
509 th->check = 0; 509 th->check = 0;
510 th->check = ~tcp_v4_check(th, skb->len, iph->saddr, iph->daddr, 0); 510 th->check = ~tcp_v4_check(th, skb->len, iph->saddr, iph->daddr, 0);
511 skb->csum = offsetof(struct tcphdr, check); 511 skb->csum = offsetof(struct tcphdr, check);
512 skb->ip_summed = CHECKSUM_HW; 512 skb->ip_summed = CHECKSUM_PARTIAL;
513 return 0; 513 return 0;
514} 514}
515 515
@@ -973,7 +973,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb)
973 973
974static int tcp_v4_checksum_init(struct sk_buff *skb) 974static int tcp_v4_checksum_init(struct sk_buff *skb)
975{ 975{
976 if (skb->ip_summed == CHECKSUM_HW) { 976 if (skb->ip_summed == CHECKSUM_COMPLETE) {
977 if (!tcp_v4_check(skb->h.th, skb->len, skb->nh.iph->saddr, 977 if (!tcp_v4_check(skb->h.th, skb->len, skb->nh.iph->saddr,
978 skb->nh.iph->daddr, skb->csum)) { 978 skb->nh.iph->daddr, skb->csum)) {
979 skb->ip_summed = CHECKSUM_UNNECESSARY; 979 skb->ip_summed = CHECKSUM_UNNECESSARY;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index b4f3ffe1b3b4..9252a50c4b49 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -577,7 +577,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
577 TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked; 577 TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked;
578 TCP_SKB_CB(skb)->sacked &= ~TCPCB_AT_TAIL; 578 TCP_SKB_CB(skb)->sacked &= ~TCPCB_AT_TAIL;
579 579
580 if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_HW) { 580 if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) {
581 /* Copy and checksum data tail into the new buffer. */ 581 /* Copy and checksum data tail into the new buffer. */
582 buff->csum = csum_partial_copy_nocheck(skb->data + len, skb_put(buff, nsize), 582 buff->csum = csum_partial_copy_nocheck(skb->data + len, skb_put(buff, nsize),
583 nsize, 0); 583 nsize, 0);
@@ -586,7 +586,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
586 586
587 skb->csum = csum_block_sub(skb->csum, buff->csum, len); 587 skb->csum = csum_block_sub(skb->csum, buff->csum, len);
588 } else { 588 } else {
589 skb->ip_summed = CHECKSUM_HW; 589 skb->ip_summed = CHECKSUM_PARTIAL;
590 skb_split(skb, buff, len); 590 skb_split(skb, buff, len);
591 } 591 }
592 592
@@ -689,7 +689,7 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len)
689 __pskb_trim_head(skb, len - skb_headlen(skb)); 689 __pskb_trim_head(skb, len - skb_headlen(skb));
690 690
691 TCP_SKB_CB(skb)->seq += len; 691 TCP_SKB_CB(skb)->seq += len;
692 skb->ip_summed = CHECKSUM_HW; 692 skb->ip_summed = CHECKSUM_PARTIAL;
693 693
694 skb->truesize -= len; 694 skb->truesize -= len;
695 sk->sk_wmem_queued -= len; 695 sk->sk_wmem_queued -= len;
@@ -1062,7 +1062,7 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len,
1062 /* This packet was never sent out yet, so no SACK bits. */ 1062 /* This packet was never sent out yet, so no SACK bits. */
1063 TCP_SKB_CB(buff)->sacked = 0; 1063 TCP_SKB_CB(buff)->sacked = 0;
1064 1064
1065 buff->ip_summed = skb->ip_summed = CHECKSUM_HW; 1065 buff->ip_summed = skb->ip_summed = CHECKSUM_PARTIAL;
1066 skb_split(skb, buff, len); 1066 skb_split(skb, buff, len);
1067 1067
1068 /* Fix up tso_factor for both original and new SKB. */ 1068 /* Fix up tso_factor for both original and new SKB. */
@@ -1206,8 +1206,7 @@ static int tcp_mtu_probe(struct sock *sk)
1206 TCP_SKB_CB(nskb)->flags = TCPCB_FLAG_ACK; 1206 TCP_SKB_CB(nskb)->flags = TCPCB_FLAG_ACK;
1207 TCP_SKB_CB(nskb)->sacked = 0; 1207 TCP_SKB_CB(nskb)->sacked = 0;
1208 nskb->csum = 0; 1208 nskb->csum = 0;
1209 if (skb->ip_summed == CHECKSUM_HW) 1209 nskb->ip_summed = skb->ip_summed;
1210 nskb->ip_summed = CHECKSUM_HW;
1211 1210
1212 len = 0; 1211 len = 0;
1213 while (len < probe_size) { 1212 while (len < probe_size) {
@@ -1231,7 +1230,7 @@ static int tcp_mtu_probe(struct sock *sk)
1231 ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH); 1230 ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH);
1232 if (!skb_shinfo(skb)->nr_frags) { 1231 if (!skb_shinfo(skb)->nr_frags) {
1233 skb_pull(skb, copy); 1232 skb_pull(skb, copy);
1234 if (skb->ip_summed != CHECKSUM_HW) 1233 if (skb->ip_summed != CHECKSUM_PARTIAL)
1235 skb->csum = csum_partial(skb->data, skb->len, 0); 1234 skb->csum = csum_partial(skb->data, skb->len, 0);
1236 } else { 1235 } else {
1237 __pskb_trim_head(skb, copy); 1236 __pskb_trim_head(skb, copy);
@@ -1572,10 +1571,9 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
1572 1571
1573 memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size); 1572 memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size);
1574 1573
1575 if (next_skb->ip_summed == CHECKSUM_HW) 1574 skb->ip_summed = next_skb->ip_summed;
1576 skb->ip_summed = CHECKSUM_HW;
1577 1575
1578 if (skb->ip_summed != CHECKSUM_HW) 1576 if (skb->ip_summed != CHECKSUM_PARTIAL)
1579 skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size); 1577 skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size);
1580 1578
1581 /* Update sequence range on original skb. */ 1579 /* Update sequence range on original skb. */
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index a4d005eccc7f..87152510980c 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -429,7 +429,7 @@ static int udp_push_pending_frames(struct sock *sk, struct udp_sock *up)
429 /* 429 /*
430 * Only one fragment on the socket. 430 * Only one fragment on the socket.
431 */ 431 */
432 if (skb->ip_summed == CHECKSUM_HW) { 432 if (skb->ip_summed == CHECKSUM_PARTIAL) {
433 skb->csum = offsetof(struct udphdr, check); 433 skb->csum = offsetof(struct udphdr, check);
434 uh->check = ~csum_tcpudp_magic(fl->fl4_src, fl->fl4_dst, 434 uh->check = ~csum_tcpudp_magic(fl->fl4_src, fl->fl4_dst,
435 up->len, IPPROTO_UDP, 0); 435 up->len, IPPROTO_UDP, 0);
@@ -448,7 +448,7 @@ static int udp_push_pending_frames(struct sock *sk, struct udp_sock *up)
448 * fragments on the socket so that all csums of sk_buffs 448 * fragments on the socket so that all csums of sk_buffs
449 * should be together. 449 * should be together.
450 */ 450 */
451 if (skb->ip_summed == CHECKSUM_HW) { 451 if (skb->ip_summed == CHECKSUM_PARTIAL) {
452 int offset = (unsigned char *)uh - skb->data; 452 int offset = (unsigned char *)uh - skb->data;
453 skb->csum = skb_checksum(skb, offset, skb->len - offset, 0); 453 skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
454 454
@@ -1088,7 +1088,7 @@ static void udp_checksum_init(struct sk_buff *skb, struct udphdr *uh,
1088{ 1088{
1089 if (uh->check == 0) { 1089 if (uh->check == 0) {
1090 skb->ip_summed = CHECKSUM_UNNECESSARY; 1090 skb->ip_summed = CHECKSUM_UNNECESSARY;
1091 } else if (skb->ip_summed == CHECKSUM_HW) { 1091 } else if (skb->ip_summed == CHECKSUM_COMPLETE) {
1092 if (!udp_check(uh, ulen, saddr, daddr, skb->csum)) 1092 if (!udp_check(uh, ulen, saddr, daddr, skb->csum))
1093 skb->ip_summed = CHECKSUM_UNNECESSARY; 1093 skb->ip_summed = CHECKSUM_UNNECESSARY;
1094 } 1094 }
diff --git a/net/ipv4/xfrm4_output.c b/net/ipv4/xfrm4_output.c
index d16f863cf687..4a96a9e3ef3b 100644
--- a/net/ipv4/xfrm4_output.c
+++ b/net/ipv4/xfrm4_output.c
@@ -48,8 +48,8 @@ static int xfrm4_output_one(struct sk_buff *skb)
48 struct xfrm_state *x = dst->xfrm; 48 struct xfrm_state *x = dst->xfrm;
49 int err; 49 int err;
50 50
51 if (skb->ip_summed == CHECKSUM_HW) { 51 if (skb->ip_summed == CHECKSUM_PARTIAL) {
52 err = skb_checksum_help(skb, 0); 52 err = skb_checksum_help(skb);
53 if (err) 53 if (err)
54 goto error_nolock; 54 goto error_nolock;
55 } 55 }
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 86dac106873b..05afa6b1912b 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -294,7 +294,7 @@ looped_back:
294 hdr = (struct ipv6_rt_hdr *) skb2->h.raw; 294 hdr = (struct ipv6_rt_hdr *) skb2->h.raw;
295 } 295 }
296 296
297 if (skb->ip_summed == CHECKSUM_HW) 297 if (skb->ip_summed == CHECKSUM_COMPLETE)
298 skb->ip_summed = CHECKSUM_NONE; 298 skb->ip_summed = CHECKSUM_NONE;
299 299
300 i = n - --hdr->segments_left; 300 i = n - --hdr->segments_left;
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index dbfce089e916..103055107674 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -606,7 +606,7 @@ static int icmpv6_rcv(struct sk_buff **pskb)
606 606
607 /* Perform checksum. */ 607 /* Perform checksum. */
608 switch (skb->ip_summed) { 608 switch (skb->ip_summed) {
609 case CHECKSUM_HW: 609 case CHECKSUM_COMPLETE:
610 if (!csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6, 610 if (!csum_ipv6_magic(saddr, daddr, skb->len, IPPROTO_ICMPV6,
611 skb->csum)) 611 skb->csum))
612 break; 612 break;
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4fb47a252913..65514f21c186 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -866,7 +866,7 @@ static inline int ip6_ufo_append_data(struct sock *sk,
866 /* initialize protocol header pointer */ 866 /* initialize protocol header pointer */
867 skb->h.raw = skb->data + fragheaderlen; 867 skb->h.raw = skb->data + fragheaderlen;
868 868
869 skb->ip_summed = CHECKSUM_HW; 869 skb->ip_summed = CHECKSUM_PARTIAL;
870 skb->csum = 0; 870 skb->csum = 0;
871 sk->sk_sndmsg_off = 0; 871 sk->sk_sndmsg_off = 0;
872 } 872 }
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index 395a417ba955..580b1aba6722 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -87,7 +87,7 @@ unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook,
87 unsigned int csum = 0; 87 unsigned int csum = 0;
88 88
89 switch (skb->ip_summed) { 89 switch (skb->ip_summed) {
90 case CHECKSUM_HW: 90 case CHECKSUM_COMPLETE:
91 if (hook != NF_IP6_PRE_ROUTING && hook != NF_IP6_LOCAL_IN) 91 if (hook != NF_IP6_PRE_ROUTING && hook != NF_IP6_LOCAL_IN)
92 break; 92 break;
93 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, 93 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr,
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 968a14be0d05..c01c126224e2 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -206,9 +206,9 @@ ipq_build_packet_message(struct ipq_queue_entry *entry, int *errp)
206 break; 206 break;
207 207
208 case IPQ_COPY_PACKET: 208 case IPQ_COPY_PACKET:
209 if (entry->skb->ip_summed == CHECKSUM_HW && 209 if ((entry->skb->ip_summed == CHECKSUM_PARTIAL ||
210 (*errp = skb_checksum_help(entry->skb, 210 entry->skb->ip_summed == CHECKSUM_COMPLETE) &&
211 entry->info->outdev == NULL))) { 211 (*errp = skb_checksum_help(entry->skb))) {
212 read_unlock_bh(&queue_lock); 212 read_unlock_bh(&queue_lock);
213 return NULL; 213 return NULL;
214 } 214 }
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 00d5583807f7..7a4e4c2e3197 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -408,7 +408,7 @@ static int nf_ct_frag6_queue(struct nf_ct_frag6_queue *fq, struct sk_buff *skb,
408 return -1; 408 return -1;
409 } 409 }
410 410
411 if (skb->ip_summed == CHECKSUM_HW) 411 if (skb->ip_summed == CHECKSUM_COMPLETE)
412 skb->csum = csum_sub(skb->csum, 412 skb->csum = csum_sub(skb->csum,
413 csum_partial(skb->nh.raw, 413 csum_partial(skb->nh.raw,
414 (u8*)(fhdr + 1) - skb->nh.raw, 414 (u8*)(fhdr + 1) - skb->nh.raw,
@@ -640,7 +640,7 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev)
640 head->len += fp->len; 640 head->len += fp->len;
641 if (head->ip_summed != fp->ip_summed) 641 if (head->ip_summed != fp->ip_summed)
642 head->ip_summed = CHECKSUM_NONE; 642 head->ip_summed = CHECKSUM_NONE;
643 else if (head->ip_summed == CHECKSUM_HW) 643 else if (head->ip_summed == CHECKSUM_COMPLETE)
644 head->csum = csum_add(head->csum, fp->csum); 644 head->csum = csum_add(head->csum, fp->csum);
645 head->truesize += fp->truesize; 645 head->truesize += fp->truesize;
646 atomic_sub(fp->truesize, &nf_ct_frag6_mem); 646 atomic_sub(fp->truesize, &nf_ct_frag6_mem);
@@ -652,7 +652,7 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev)
652 head->nh.ipv6h->payload_len = htons(payload_len); 652 head->nh.ipv6h->payload_len = htons(payload_len);
653 653
654 /* Yes, and fold redundant checksum back. 8) */ 654 /* Yes, and fold redundant checksum back. 8) */
655 if (head->ip_summed == CHECKSUM_HW) 655 if (head->ip_summed == CHECKSUM_COMPLETE)
656 head->csum = csum_partial(head->nh.raw, head->h.raw-head->nh.raw, head->csum); 656 head->csum = csum_partial(head->nh.raw, head->h.raw-head->nh.raw, head->csum);
657 657
658 fq->fragments = NULL; 658 fq->fragments = NULL;
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index d5040e172292..d4af1cb5e19f 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -334,7 +334,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
334 if (!rp->checksum) 334 if (!rp->checksum)
335 skb->ip_summed = CHECKSUM_UNNECESSARY; 335 skb->ip_summed = CHECKSUM_UNNECESSARY;
336 336
337 if (skb->ip_summed == CHECKSUM_HW) { 337 if (skb->ip_summed == CHECKSUM_COMPLETE) {
338 skb_postpull_rcsum(skb, skb->nh.raw, 338 skb_postpull_rcsum(skb, skb->nh.raw,
339 skb->h.raw - skb->nh.raw); 339 skb->h.raw - skb->nh.raw);
340 if (!csum_ipv6_magic(&skb->nh.ipv6h->saddr, 340 if (!csum_ipv6_magic(&skb->nh.ipv6h->saddr,
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 4e299c69e1c6..a8623d2b0879 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -433,7 +433,7 @@ static void ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb,
433 return; 433 return;
434 } 434 }
435 435
436 if (skb->ip_summed == CHECKSUM_HW) 436 if (skb->ip_summed == CHECKSUM_COMPLETE)
437 skb->csum = csum_sub(skb->csum, 437 skb->csum = csum_sub(skb->csum,
438 csum_partial(skb->nh.raw, (u8*)(fhdr+1)-skb->nh.raw, 0)); 438 csum_partial(skb->nh.raw, (u8*)(fhdr+1)-skb->nh.raw, 0));
439 439
@@ -647,7 +647,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in,
647 head->len += fp->len; 647 head->len += fp->len;
648 if (head->ip_summed != fp->ip_summed) 648 if (head->ip_summed != fp->ip_summed)
649 head->ip_summed = CHECKSUM_NONE; 649 head->ip_summed = CHECKSUM_NONE;
650 else if (head->ip_summed == CHECKSUM_HW) 650 else if (head->ip_summed == CHECKSUM_COMPLETE)
651 head->csum = csum_add(head->csum, fp->csum); 651 head->csum = csum_add(head->csum, fp->csum);
652 head->truesize += fp->truesize; 652 head->truesize += fp->truesize;
653 atomic_sub(fp->truesize, &ip6_frag_mem); 653 atomic_sub(fp->truesize, &ip6_frag_mem);
@@ -662,7 +662,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in,
662 *skb_in = head; 662 *skb_in = head;
663 663
664 /* Yes, and fold redundant checksum back. 8) */ 664 /* Yes, and fold redundant checksum back. 8) */
665 if (head->ip_summed == CHECKSUM_HW) 665 if (head->ip_summed == CHECKSUM_COMPLETE)
666 head->csum = csum_partial(head->nh.raw, head->h.raw-head->nh.raw, head->csum); 666 head->csum = csum_partial(head->nh.raw, head->h.raw-head->nh.raw, head->csum);
667 667
668 IP6_INC_STATS_BH(IPSTATS_MIB_REASMOKS); 668 IP6_INC_STATS_BH(IPSTATS_MIB_REASMOKS);
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 302786a11cd6..7f1b660493b7 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -545,7 +545,7 @@ static void tcp_v6_send_check(struct sock *sk, int len, struct sk_buff *skb)
545 struct ipv6_pinfo *np = inet6_sk(sk); 545 struct ipv6_pinfo *np = inet6_sk(sk);
546 struct tcphdr *th = skb->h.th; 546 struct tcphdr *th = skb->h.th;
547 547
548 if (skb->ip_summed == CHECKSUM_HW) { 548 if (skb->ip_summed == CHECKSUM_PARTIAL) {
549 th->check = ~csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, 0); 549 th->check = ~csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, 0);
550 skb->csum = offsetof(struct tcphdr, check); 550 skb->csum = offsetof(struct tcphdr, check);
551 } else { 551 } else {
@@ -570,7 +570,7 @@ static int tcp_v6_gso_send_check(struct sk_buff *skb)
570 th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, skb->len, 570 th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, skb->len,
571 IPPROTO_TCP, 0); 571 IPPROTO_TCP, 0);
572 skb->csum = offsetof(struct tcphdr, check); 572 skb->csum = offsetof(struct tcphdr, check);
573 skb->ip_summed = CHECKSUM_HW; 573 skb->ip_summed = CHECKSUM_PARTIAL;
574 return 0; 574 return 0;
575} 575}
576 576
@@ -1033,7 +1033,7 @@ out:
1033 1033
1034static int tcp_v6_checksum_init(struct sk_buff *skb) 1034static int tcp_v6_checksum_init(struct sk_buff *skb)
1035{ 1035{
1036 if (skb->ip_summed == CHECKSUM_HW) { 1036 if (skb->ip_summed == CHECKSUM_COMPLETE) {
1037 if (!tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, 1037 if (!tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr,
1038 &skb->nh.ipv6h->daddr,skb->csum)) { 1038 &skb->nh.ipv6h->daddr,skb->csum)) {
1039 skb->ip_summed = CHECKSUM_UNNECESSARY; 1039 skb->ip_summed = CHECKSUM_UNNECESSARY;
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 82c7c9cde2a8..780b89f6dfcc 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -475,7 +475,7 @@ static int udpv6_rcv(struct sk_buff **pskb)
475 uh = skb->h.uh; 475 uh = skb->h.uh;
476 } 476 }
477 477
478 if (skb->ip_summed == CHECKSUM_HW && 478 if (skb->ip_summed == CHECKSUM_COMPLETE &&
479 !csum_ipv6_magic(saddr, daddr, ulen, IPPROTO_UDP, skb->csum)) 479 !csum_ipv6_magic(saddr, daddr, ulen, IPPROTO_UDP, skb->csum))
480 skb->ip_summed = CHECKSUM_UNNECESSARY; 480 skb->ip_summed = CHECKSUM_UNNECESSARY;
481 481
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c
index c8c8b44a0f58..6d111743e508 100644
--- a/net/ipv6/xfrm6_output.c
+++ b/net/ipv6/xfrm6_output.c
@@ -41,8 +41,8 @@ static int xfrm6_output_one(struct sk_buff *skb)
41 struct xfrm_state *x = dst->xfrm; 41 struct xfrm_state *x = dst->xfrm;
42 int err; 42 int err;
43 43
44 if (skb->ip_summed == CHECKSUM_HW) { 44 if (skb->ip_summed == CHECKSUM_PARTIAL) {
45 err = skb_checksum_help(skb, 0); 45 err = skb_checksum_help(skb);
46 if (err) 46 if (err)
47 goto error_nolock; 47 goto error_nolock;
48 } 48 }
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index af8adcba23a7..308d2abd7ee5 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -823,8 +823,7 @@ static int tcp_error(struct sk_buff *skb,
823 823
824 /* Checksum invalid? Ignore. 824 /* Checksum invalid? Ignore.
825 * We skip checking packets on the outgoing path 825 * We skip checking packets on the outgoing path
826 * because the semantic of CHECKSUM_HW is different there 826 * because the checksum is assumed to be correct.
827 * and moreover root might send raw packets.
828 */ 827 */
829 /* FIXME: Source route IP option packets --RR */ 828 /* FIXME: Source route IP option packets --RR */
830 if (nf_conntrack_checksum && 829 if (nf_conntrack_checksum &&
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index ae07ebe3ab37..d36e03139e8b 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -131,8 +131,7 @@ static int udp_error(struct sk_buff *skb, unsigned int dataoff,
131 131
132 /* Checksum invalid? Ignore. 132 /* Checksum invalid? Ignore.
133 * We skip checking packets on the outgoing path 133 * We skip checking packets on the outgoing path
134 * because the semantic of CHECKSUM_HW is different there 134 * because the checksum is assumed to be correct.
135 * and moreover root might send raw packets.
136 * FIXME: Source route IP option packets --RR */ 135 * FIXME: Source route IP option packets --RR */
137 if (nf_conntrack_checksum && 136 if (nf_conntrack_checksum &&
138 ((pf == PF_INET && hooknum == NF_IP_PRE_ROUTING) || 137 ((pf == PF_INET && hooknum == NF_IP_PRE_ROUTING) ||
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 49ef41e34c48..eddfbe4441a2 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -377,9 +377,9 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
377 break; 377 break;
378 378
379 case NFQNL_COPY_PACKET: 379 case NFQNL_COPY_PACKET:
380 if (entskb->ip_summed == CHECKSUM_HW && 380 if ((entskb->ip_summed == CHECKSUM_PARTIAL ||
381 (*errp = skb_checksum_help(entskb, 381 entskb->ip_summed == CHECKSUM_COMPLETE) &&
382 outdev == NULL))) { 382 (*errp = skb_checksum_help(entskb))) {
383 spin_unlock_bh(&queue->lock); 383 spin_unlock_bh(&queue->lock);
384 return NULL; 384 return NULL;
385 } 385 }
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 4172a5235916..300215bdbf46 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -586,7 +586,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
586 else if (skb->pkt_type == PACKET_OUTGOING) { 586 else if (skb->pkt_type == PACKET_OUTGOING) {
587 /* Special case: outgoing packets have ll header at head */ 587 /* Special case: outgoing packets have ll header at head */
588 skb_pull(skb, skb->nh.raw - skb->data); 588 skb_pull(skb, skb->nh.raw - skb->data);
589 if (skb->ip_summed == CHECKSUM_HW) 589 if (skb->ip_summed == CHECKSUM_PARTIAL)
590 status |= TP_STATUS_CSUMNOTREADY; 590 status |= TP_STATUS_CSUMNOTREADY;
591 } 591 }
592 } 592 }
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index a08ec4c7c55d..45939bafbdf8 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -192,8 +192,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
192 */ 192 */
193 if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) { 193 if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) {
194 if (!(skb = skb_unshare(skb, GFP_ATOMIC)) 194 if (!(skb = skb_unshare(skb, GFP_ATOMIC))
195 || (skb->ip_summed == CHECKSUM_HW 195 || (skb->ip_summed == CHECKSUM_PARTIAL
196 && skb_checksum_help(skb, 0))) { 196 && skb_checksum_help(skb))) {
197 sch->qstats.drops++; 197 sch->qstats.drops++;
198 return NET_XMIT_DROP; 198 return NET_XMIT_DROP;
199 } 199 }
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index eb330d4f66d6..6f17527b9e69 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -168,7 +168,7 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
168 return -1; 168 return -1;
169 if ((unsigned short)csum_fold(desc.csum)) 169 if ((unsigned short)csum_fold(desc.csum))
170 return -1; 170 return -1;
171 if (unlikely(skb->ip_summed == CHECKSUM_HW)) 171 if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE))
172 netdev_rx_csum_fault(skb->dev); 172 netdev_rx_csum_fault(skb->dev);
173 return 0; 173 return 0;
174no_checksum: 174no_checksum: