diff options
author | Patrick McHardy <kaber@trash.net> | 2006-08-29 19:44:56 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:53:53 -0400 |
commit | 84fa7933a33f806bbbaae6775e87459b1ec584c0 (patch) | |
tree | 5be404225d90f640997b12f631e9b496b3fd0d61 /drivers/net | |
parent | 8584d6df39db5601965f9bc5e3bf2fea833ad7bb (diff) |
[NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE
Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose
checksum still needs to be completed) and CHECKSUM_COMPLETE (for
incoming packets, device supplied full checksum).
Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/3c59x.c | 2 | ||||
-rw-r--r-- | drivers/net/8139cp.c | 6 | ||||
-rw-r--r-- | drivers/net/acenic.c | 8 | ||||
-rw-r--r-- | drivers/net/bnx2.c | 2 | ||||
-rw-r--r-- | drivers/net/cassini.c | 4 | ||||
-rw-r--r-- | drivers/net/chelsio/sge.c | 10 | ||||
-rw-r--r-- | drivers/net/dl2k.c | 2 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 8 | ||||
-rw-r--r-- | drivers/net/forcedeth.c | 3 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
-rw-r--r-- | drivers/net/hamachi.c | 2 | ||||
-rw-r--r-- | drivers/net/ibm_emac/ibm_emac_core.c | 2 | ||||
-rw-r--r-- | drivers/net/ioc3-eth.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 2 | ||||
-rw-r--r-- | drivers/net/mv643xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 8 | ||||
-rw-r--r-- | drivers/net/ns83820.c | 2 | ||||
-rw-r--r-- | drivers/net/r8169.c | 2 | ||||
-rw-r--r-- | drivers/net/s2io.c | 2 | ||||
-rw-r--r-- | drivers/net/sk98lin/skge.c | 6 | ||||
-rw-r--r-- | drivers/net/skge.c | 4 | ||||
-rw-r--r-- | drivers/net/sky2.c | 6 | ||||
-rw-r--r-- | drivers/net/starfire.c | 6 | ||||
-rw-r--r-- | drivers/net/sungem.c | 4 | ||||
-rw-r--r-- | drivers/net/sunhme.c | 6 | ||||
-rw-r--r-- | drivers/net/tg3.c | 6 | ||||
-rw-r--r-- | drivers/net/typhoon.c | 2 | ||||
-rw-r--r-- | drivers/net/via-rhine.c | 2 | ||||
-rw-r--r-- | drivers/net/via-velocity.c | 2 |
29 files changed, 58 insertions, 57 deletions
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; |