summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorIan Campbell <Ian.Campbell@citrix.com>2011-10-10 01:11:38 +0000
committerDavid S. Miller <davem@davemloft.net>2011-10-10 15:19:13 -0400
commit618c4a0ad41a42edd4f06259623f78f2e8da66e8 (patch)
tree18ed614dc6a32be46da4c9e2b57f6a099b329307 /drivers/net/ethernet/ibm
parent95f5f803b3897f622c4b5f72d554874faf74df12 (diff)
ehea: convert to SKB paged frag API
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>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index c821cb65399..dfefe809c48 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -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;
}
@@ -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++;
}
}
@@ -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;
}
}