diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2011-08-30 20:46:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-15 15:35:00 -0400 |
commit | 134b413ca3a1055608495bbb60caeb754a073766 (patch) | |
tree | ea12335d55b25111d21d1ff201b807e3035348f1 /drivers/net/ethernet/sun | |
parent | e859ce4c64dd124ec4e2da31159a89e33e7ed7fc (diff) |
niu: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 3c9ef1c196a..cad58f26c47 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -3290,11 +3290,8 @@ static void niu_rx_skb_append(struct sk_buff *skb, struct page *page, | |||
3290 | u32 offset, u32 size) | 3290 | u32 offset, u32 size) |
3291 | { | 3291 | { |
3292 | int i = skb_shinfo(skb)->nr_frags; | 3292 | int i = skb_shinfo(skb)->nr_frags; |
3293 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | ||
3294 | 3293 | ||
3295 | frag->page = page; | 3294 | __skb_fill_page_desc(skb, i, page, offset, size); |
3296 | frag->page_offset = offset; | ||
3297 | frag->size = size; | ||
3298 | 3295 | ||
3299 | skb->len += size; | 3296 | skb->len += size; |
3300 | skb->data_len += size; | 3297 | skb->data_len += size; |
@@ -6737,7 +6734,7 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb, | |||
6737 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 6734 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
6738 | 6735 | ||
6739 | len = frag->size; | 6736 | len = frag->size; |
6740 | mapping = np->ops->map_page(np->device, frag->page, | 6737 | mapping = np->ops->map_page(np->device, skb_frag_page(frag), |
6741 | frag->page_offset, len, | 6738 | frag->page_offset, len, |
6742 | DMA_TO_DEVICE); | 6739 | DMA_TO_DEVICE); |
6743 | 6740 | ||