Commit c32ba3f9 authored by David S. Miller's avatar David S. Miller

appletalk: Use frag list abstraction interfaces.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a5bd8a13
...@@ -939,6 +939,7 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset, ...@@ -939,6 +939,7 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset,
int len, unsigned long sum) int len, unsigned long sum)
{ {
int start = skb_headlen(skb); int start = skb_headlen(skb);
struct sk_buff *frag_iter;
int i, copy; int i, copy;
/* checksum stuff in header space */ /* checksum stuff in header space */
...@@ -977,19 +978,16 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset, ...@@ -977,19 +978,16 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset,
start = end; start = end;
} }
if (skb_shinfo(skb)->frag_list) { skb_walk_frags(skb, frag_iter) {
struct sk_buff *list = skb_shinfo(skb)->frag_list;
for (; list; list = list->next) {
int end; int end;
WARN_ON(start > offset + len); WARN_ON(start > offset + len);
end = start + list->len; end = start + frag_iter->len;
if ((copy = end - offset) > 0) { if ((copy = end - offset) > 0) {
if (copy > len) if (copy > len)
copy = len; copy = len;
sum = atalk_sum_skb(list, offset - start, sum = atalk_sum_skb(frag_iter, offset - start,
copy, sum); copy, sum);
if ((len -= copy) == 0) if ((len -= copy) == 0)
return sum; return sum;
...@@ -997,7 +995,6 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset, ...@@ -997,7 +995,6 @@ static unsigned long atalk_sum_skb(const struct sk_buff *skb, int offset,
} }
start = end; start = end;
} }
}
BUG_ON(len > 0); BUG_ON(len > 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment