aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ehea/ehea_main.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 0fc0ae8b830f..289ad4d31f1d 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -2087,27 +2087,14 @@ static void ehea_xmit2(struct sk_buff *skb, struct net_device *dev,
2087static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev, 2087static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev,
2088 struct ehea_swqe *swqe) 2088 struct ehea_swqe *swqe)
2089{ 2089{
2090 int nfrags = skb_shinfo(skb)->nr_frags;
2091 u8 *imm_data = &swqe->u.immdata_nodesc.immediate_data[0]; 2090 u8 *imm_data = &swqe->u.immdata_nodesc.immediate_data[0];
2092 skb_frag_t *frag;
2093 int i;
2094 2091
2095 xmit_common(skb, swqe); 2092 xmit_common(skb, swqe);
2096 2093
2097 if (nfrags == 0) { 2094 if (!skb->data_len)
2098 skb_copy_from_linear_data(skb, imm_data, skb->len); 2095 skb_copy_from_linear_data(skb, imm_data, skb->len);
2099 } else { 2096 else
2100 skb_copy_from_linear_data(skb, imm_data, 2097 skb_copy_bits(skb, 0, imm_data, skb->len);
2101 skb_headlen(skb));
2102 imm_data += skb_headlen(skb);
2103
2104 /* ... then copy data from the fragments */
2105 for (i = 0; i < nfrags; i++) {
2106 frag = &skb_shinfo(skb)->frags[i];
2107 memcpy(imm_data, skb_frag_address(frag), frag->size);
2108 imm_data += frag->size;
2109 }
2110 }
2111 2098
2112 swqe->immediate_data_length = skb->len; 2099 swqe->immediate_data_length = skb->len;
2113 dev_kfree_skb(skb); 2100 dev_kfree_skb(skb);