Skip to content

Commit

Permalink
ehea: convert to SKB paged frag API
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Breno Leitao <leitao@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ian Campbell authored and David S. Miller committed Oct 10, 2011
1 parent 95f5f80 commit 618c4a0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/net/ethernet/ibm/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1817,8 +1817,7 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,
sg1entry->l_key = lkey;
sg1entry->len = frag->size;
sg1entry->vaddr =
ehea_map_vaddr(page_address(frag->page)
+ frag->page_offset);
ehea_map_vaddr(skb_frag_address(frag));
swqe->descriptors++;
sg1entry_contains_frag_data = 1;
}
Expand All @@ -1830,9 +1829,7 @@ static inline void write_swqe2_data(struct sk_buff *skb, struct net_device *dev,

sgentry->l_key = lkey;
sgentry->len = frag->size;
sgentry->vaddr =
ehea_map_vaddr(page_address(frag->page)
+ frag->page_offset);
sgentry->vaddr = ehea_map_vaddr(skb_frag_address(frag));
swqe->descriptors++;
}
}
Expand Down Expand Up @@ -2222,9 +2219,7 @@ static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev,
/* ... then copy data from the fragments */
for (i = 0; i < nfrags; i++) {
frag = &skb_shinfo(skb)->frags[i];
memcpy(imm_data,
page_address(frag->page) + frag->page_offset,
frag->size);
memcpy(imm_data, skb_frag_address(frag), frag->size);
imm_data += frag->size;
}
}
Expand Down

0 comments on commit 618c4a0

Please sign in to comment.