diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /net/appletalk/ddp.c | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'net/appletalk/ddp.c')
-rw-r--r-- | net/appletalk/ddp.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index d6a9243641af..b603cbacdc58 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -939,6 +939,7 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset, | |||
939 | int len, unsigned long sum) | 939 | int len, unsigned long sum) |
940 | { | 940 | { |
941 | int start = skb_headlen(skb); | 941 | int start = skb_headlen(skb); |
942 | struct sk_buff *frag_iter; | ||
942 | int i, copy; | 943 | int i, copy; |
943 | 944 | ||
944 | /* checksum stuff in header space */ | 945 | /* checksum stuff in header space */ |
@@ -977,26 +978,22 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset, | |||
977 | start = end; | 978 | start = end; |
978 | } | 979 | } |
979 | 980 | ||
980 | if (skb_shinfo(skb)->frag_list) { | 981 | skb_walk_frags(skb, frag_iter) { |
981 | struct sk_buff *list = skb_shinfo(skb)->frag_list; | 982 | int end; |
982 | |||
983 | for (; list; list = list->next) { | ||
984 | int end; | ||
985 | 983 | ||
986 | WARN_ON(start > offset + len); | 984 | WARN_ON(start > offset + len); |
987 | 985 | ||
988 | end = start + list->len; | 986 | end = start + frag_iter->len; |
989 | if ((copy = end - offset) > 0) { | 987 | if ((copy = end - offset) > 0) { |
990 | if (copy > len) | 988 | if (copy > len) |
991 | copy = len; | 989 | copy = len; |
992 | sum = atalk_sum_skb(list, offset - start, | 990 | sum = atalk_sum_skb(frag_iter, offset - start, |
993 | copy, sum); | 991 | copy, sum); |
994 | if ((len -= copy) == 0) | 992 | if ((len -= copy) == 0) |
995 | return sum; | 993 | return sum; |
996 | offset += copy; | 994 | offset += copy; |
997 | } | ||
998 | start = end; | ||
999 | } | 995 | } |
996 | start = end; | ||
1000 | } | 997 | } |
1001 | 998 | ||
1002 | BUG_ON(len > 0); | 999 | BUG_ON(len > 0); |