diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
commit | 15c54033964a943de7b0763efd3bd0ede7326395 (patch) | |
tree | 840b292612d1b5396d5bab5bde537a9013db3ceb /drivers/net/ioc3-eth.c | |
parent | ad5da3cf39a5b11a198929be1f2644e17ecd767e (diff) | |
parent | 912a41a4ab935ce8c4308428ec13fc7f8b1f18f4 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (448 commits)
[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
[IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
[IPV4]: Add multipath cached to feature-removal-schedule.txt
[WIRELESS] cfg80211: Clarify locking comment.
[WIRELESS] cfg80211: Fix locking in wiphy_new.
[WEXT] net_device: Don't include wext bits if not required.
[WEXT]: Misc code cleanups.
[WEXT]: Reduce inline abuse.
[WEXT]: Move EXPORT_SYMBOL statements where they belong.
[WEXT]: Cleanup early ioctl call path.
[WEXT]: Remove options.
[WEXT]: Remove dead debug code.
[WEXT]: Clean up how wext is called.
[WEXT]: Move to net/wireless
[AFS]: Eliminate cmpxchg() usage in vlocation code.
[RXRPC]: Fix pointers passed to bitops.
[RXRPC]: Remove bogus atomic_* overrides.
[AFS]: Fix u64 printing in debug logging.
[AFS]: Add "directory write" support.
[AFS]: Implement the CB.InitCallBackState3 operation.
...
Diffstat (limited to 'drivers/net/ioc3-eth.c')
-rw-r--r-- | drivers/net/ioc3-eth.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index 4ad780719a84..f749e07c6425 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -633,8 +633,6 @@ static inline void ioc3_rx(struct ioc3_private *ip) | |||
633 | 633 | ||
634 | ip->rx_skbs[rx_entry] = NULL; /* Poison */ | 634 | ip->rx_skbs[rx_entry] = NULL; /* Poison */ |
635 | 635 | ||
636 | new_skb->dev = priv_netdev(ip); | ||
637 | |||
638 | /* Because we reserve afterwards. */ | 636 | /* Because we reserve afterwards. */ |
639 | skb_put(new_skb, (1664 + RX_OFFSET)); | 637 | skb_put(new_skb, (1664 + RX_OFFSET)); |
640 | rxb = (struct ioc3_erxbuf *) new_skb->data; | 638 | rxb = (struct ioc3_erxbuf *) new_skb->data; |
@@ -940,7 +938,6 @@ static void ioc3_alloc_rings(struct net_device *dev) | |||
940 | } | 938 | } |
941 | 939 | ||
942 | ip->rx_skbs[i] = skb; | 940 | ip->rx_skbs[i] = skb; |
943 | skb->dev = dev; | ||
944 | 941 | ||
945 | /* Because we reserve afterwards. */ | 942 | /* Because we reserve afterwards. */ |
946 | skb_put(skb, (1664 + RX_OFFSET)); | 943 | skb_put(skb, (1664 + RX_OFFSET)); |
@@ -1396,9 +1393,9 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1396 | * manually. | 1393 | * manually. |
1397 | */ | 1394 | */ |
1398 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 1395 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
1399 | int proto = ntohs(skb->nh.iph->protocol); | 1396 | const struct iphdr *ih = ip_hdr(skb); |
1397 | const int proto = ntohs(ih->protocol); | ||
1400 | unsigned int csoff; | 1398 | unsigned int csoff; |
1401 | struct iphdr *ih = skb->nh.iph; | ||
1402 | uint32_t csum, ehsum; | 1399 | uint32_t csum, ehsum; |
1403 | uint16_t *eh; | 1400 | uint16_t *eh; |
1404 | 1401 | ||
@@ -1425,11 +1422,11 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1425 | csoff = ETH_HLEN + (ih->ihl << 2); | 1422 | csoff = ETH_HLEN + (ih->ihl << 2); |
1426 | if (proto == IPPROTO_UDP) { | 1423 | if (proto == IPPROTO_UDP) { |
1427 | csoff += offsetof(struct udphdr, check); | 1424 | csoff += offsetof(struct udphdr, check); |
1428 | skb->h.uh->check = csum; | 1425 | udp_hdr(skb)->check = csum; |
1429 | } | 1426 | } |
1430 | if (proto == IPPROTO_TCP) { | 1427 | if (proto == IPPROTO_TCP) { |
1431 | csoff += offsetof(struct tcphdr, check); | 1428 | csoff += offsetof(struct tcphdr, check); |
1432 | skb->h.th->check = csum; | 1429 | tcp_hdr(skb)->check = csum; |
1433 | } | 1430 | } |
1434 | 1431 | ||
1435 | w0 = ETXD_DOCHECKSUM | (csoff << ETXD_CHKOFF_SHIFT); | 1432 | w0 = ETXD_DOCHECKSUM | (csoff << ETXD_CHKOFF_SHIFT); |
@@ -1446,7 +1443,7 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1446 | 1443 | ||
1447 | if (len <= 104) { | 1444 | if (len <= 104) { |
1448 | /* Short packet, let's copy it directly into the ring. */ | 1445 | /* Short packet, let's copy it directly into the ring. */ |
1449 | memcpy(desc->data, skb->data, skb->len); | 1446 | skb_copy_from_linear_data(skb, desc->data, skb->len); |
1450 | if (len < ETH_ZLEN) { | 1447 | if (len < ETH_ZLEN) { |
1451 | /* Very short packet, pad with zeros at the end. */ | 1448 | /* Very short packet, pad with zeros at the end. */ |
1452 | memset(desc->data + len, 0, ETH_ZLEN - len); | 1449 | memset(desc->data + len, 0, ETH_ZLEN - len); |