diff options
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index e2d25fbb6d28..3f445efa9482 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -1618,7 +1618,7 @@ static void write_swqe2_TSO(struct sk_buff *skb, | |||
1618 | { | 1618 | { |
1619 | struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry; | 1619 | struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry; |
1620 | u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; | 1620 | u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; |
1621 | int skb_data_size = skb->len - skb->data_len; | 1621 | int skb_data_size = skb_headlen(skb); |
1622 | int headersize; | 1622 | int headersize; |
1623 | 1623 | ||
1624 | /* Packet is TCP with TSO enabled */ | 1624 | /* Packet is TCP with TSO enabled */ |
@@ -1629,7 +1629,7 @@ static void write_swqe2_TSO(struct sk_buff *skb, | |||
1629 | */ | 1629 | */ |
1630 | headersize = ETH_HLEN + ip_hdrlen(skb) + tcp_hdrlen(skb); | 1630 | headersize = ETH_HLEN + ip_hdrlen(skb) + tcp_hdrlen(skb); |
1631 | 1631 | ||
1632 | skb_data_size = skb->len - skb->data_len; | 1632 | skb_data_size = skb_headlen(skb); |
1633 | 1633 | ||
1634 | if (skb_data_size >= headersize) { | 1634 | if (skb_data_size >= headersize) { |
1635 | /* copy immediate data */ | 1635 | /* copy immediate data */ |
@@ -1651,7 +1651,7 @@ static void write_swqe2_TSO(struct sk_buff *skb, | |||
1651 | static void write_swqe2_nonTSO(struct sk_buff *skb, | 1651 | static void write_swqe2_nonTSO(struct sk_buff *skb, |
1652 | struct ehea_swqe *swqe, u32 lkey) | 1652 | struct ehea_swqe *swqe, u32 lkey) |
1653 | { | 1653 | { |
1654 | int skb_data_size = skb->len - skb->data_len; | 1654 | int skb_data_size = skb_headlen(skb); |
1655 | u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; | 1655 | u8 *imm_data = &swqe->u.immdata_desc.immediate_data[0]; |
1656 | struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry; | 1656 | struct ehea_vsgentry *sg1entry = &swqe->u.immdata_desc.sg_entry; |
1657 | 1657 | ||
@@ -2108,8 +2108,8 @@ static void ehea_xmit3(struct sk_buff *skb, struct net_device *dev, | |||
2108 | } else { | 2108 | } else { |
2109 | /* first copy data from the skb->data buffer ... */ | 2109 | /* first copy data from the skb->data buffer ... */ |
2110 | skb_copy_from_linear_data(skb, imm_data, | 2110 | skb_copy_from_linear_data(skb, imm_data, |
2111 | skb->len - skb->data_len); | 2111 | skb_headlen(skb)); |
2112 | imm_data += skb->len - skb->data_len; | 2112 | imm_data += skb_headlen(skb); |
2113 | 2113 | ||
2114 | /* ... then copy data from the fragments */ | 2114 | /* ... then copy data from the fragments */ |
2115 | for (i = 0; i < nfrags; i++) { | 2115 | for (i = 0; i < nfrags; i++) { |