Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18781
b: refs/heads/master
c: 6389057
h: refs/heads/master
i:
  18779: 08747af
v: v3
  • Loading branch information
Wolfram Joost authored and Jeff Garzik committed Jan 17, 2006
1 parent 5d21fd8 commit 554b0a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f5187035ad475c90ca865318daa09ba43bc3e68
refs/heads/master: 63890576a3bfd5c6aea86fb72236682480865bc0
19 changes: 11 additions & 8 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,22 +1148,23 @@ static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
5 << ETH_TX_IHL_SHIFT;
pkt_info.l4i_chk = 0;
} else {

pkt_info.cmd_sts = ETH_TX_ENABLE_INTERRUPT |
ETH_TX_FIRST_DESC |
ETH_TX_LAST_DESC |
ETH_GEN_TCP_UDP_CHECKSUM |
ETH_GEN_IP_V_4_CHECKSUM |
skb->nh.iph->ihl << ETH_TX_IHL_SHIFT;
/* CPU already calculated pseudo header checksum. */
if (skb->nh.iph->protocol == IPPROTO_UDP) {
if ((skb->protocol == ETH_P_IP) &&
(skb->nh.iph->protocol == IPPROTO_UDP) ) {
pkt_info.cmd_sts |= ETH_UDP_FRAME;
pkt_info.l4i_chk = skb->h.uh->check;
} else if (skb->nh.iph->protocol == IPPROTO_TCP)
} else if ((skb->protocol == ETH_P_IP) &&
(skb->nh.iph->protocol == IPPROTO_TCP))
pkt_info.l4i_chk = skb->h.th->check;
else {
printk(KERN_ERR
"%s: chksum proto != TCP or UDP\n",
"%s: chksum proto != IPv4 TCP or UDP\n",
dev->name);
spin_unlock_irqrestore(&mp->lock, flags);
return 1;
Expand Down Expand Up @@ -1199,14 +1200,16 @@ static int mv643xx_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
ETH_GEN_IP_V_4_CHECKSUM |
skb->nh.iph->ihl << ETH_TX_IHL_SHIFT;
/* CPU already calculated pseudo header checksum. */
if (skb->nh.iph->protocol == IPPROTO_UDP) {
if ((skb->protocol == ETH_P_IP) &&
(skb->nh.iph->protocol == IPPROTO_UDP)) {
pkt_info.cmd_sts |= ETH_UDP_FRAME;
pkt_info.l4i_chk = skb->h.uh->check;
} else if (skb->nh.iph->protocol == IPPROTO_TCP)
} else if ((skb->protocol == ETH_P_IP) &&
(skb->nh.iph->protocol == IPPROTO_TCP))
pkt_info.l4i_chk = skb->h.th->check;
else {
printk(KERN_ERR
"%s: chksum proto != TCP or UDP\n",
"%s: chksum proto != IPv4 TCP or UDP\n",
dev->name);
spin_unlock_irqrestore(&mp->lock, flags);
return 1;
Expand Down Expand Up @@ -1421,7 +1424,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
* Zero copy can only work if we use Discovery II memory. Else, we will
* have to map the buffers to ISA memory which is only 16 MB
*/
dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_HW_CSUM;
dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
#endif
#endif

Expand Down

0 comments on commit 554b0a9

Please sign in to comment.