diff options
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 0e4042bc0a48..b1c90a4fe31e 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -1263,7 +1263,7 @@ static inline void write_ip_start_end(struct ehea_swqe *swqe, | |||
1263 | const struct sk_buff *skb) | 1263 | const struct sk_buff *skb) |
1264 | { | 1264 | { |
1265 | swqe->ip_start = (u8)(((u64)skb->nh.iph) - ((u64)skb->data)); | 1265 | swqe->ip_start = (u8)(((u64)skb->nh.iph) - ((u64)skb->data)); |
1266 | swqe->ip_end = (u8)(swqe->ip_start + skb->nh.iph->ihl * 4 - 1); | 1266 | swqe->ip_end = (u8)(swqe->ip_start + ip_hdrlen(skb) - 1); |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | static inline void write_tcp_offset_end(struct ehea_swqe *swqe, | 1269 | static inline void write_tcp_offset_end(struct ehea_swqe *swqe, |
@@ -1300,7 +1300,7 @@ static void write_swqe2_TSO(struct sk_buff *skb, | |||
1300 | /* copy only eth/ip/tcp headers to immediate data and | 1300 | /* copy only eth/ip/tcp headers to immediate data and |
1301 | * the rest of skb->data to sg1entry | 1301 | * the rest of skb->data to sg1entry |
1302 | */ | 1302 | */ |
1303 | headersize = ETH_HLEN + (skb->nh.iph->ihl * 4) + (skb->h.th->doff * 4); | 1303 | headersize = ETH_HLEN + ip_hdrlen(skb) + (skb->h.th->doff * 4); |
1304 | 1304 | ||
1305 | skb_data_size = skb->len - skb->data_len; | 1305 | skb_data_size = skb->len - skb->data_len; |
1306 | 1306 | ||