From 0d0b16727f24f8258eeb33818347ca0f4557f982 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Date: Tue, 14 Dec 2010 15:24:08 +0000 Subject: net: Fix drivers advertising HW_CSUM feature to use csum_start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some drivers are using skb_transport_offset(skb) instead of skb->csum_start for NETIF_F_HW_CSUM offload. This does not matter now, but if someone implements checksumming of encapsulated packets then this will break silently. TSO output paths are left as they are, since they are for IP+TCP only (might be worth converting though). Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller --- drivers/net/niu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/niu.c') diff --git a/drivers/net/niu.c b/drivers/net/niu.c index f64c42414bd7..2541321bad82 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -6589,7 +6589,7 @@ static u64 niu_compute_tx_flags(struct sk_buff *skb, struct ethhdr *ehdr, (ip_proto == IPPROTO_UDP ? TXHDR_CSUM_UDP : TXHDR_CSUM_SCTP)); - start = skb_transport_offset(skb) - + start = skb_checksum_start_offset(skb) - (pad_bytes + sizeof(struct tx_pkt_hdr)); stuff = start + skb->csum_offset; -- cgit v1.2.3