The TX checksum/offload path determines IPv4 vs IPv6 by checking the IP version. In the IPv6 case the code reads ip->v4->version even though the header is treated as IPv6 (ip->v6). Since v4/v6 are union members, this does not typically change behavior, but it is confusing and inconsistent with the header type being parsed. Use ip->v6->version in the IPv6 case to match intent and improve readability. Signed-off-by: Alok Tiwari --- drivers/net/ethernet/huawei/hinic3/hinic3_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c index 9306bf0020ca..a57ceb4d68ef 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c @@ -242,7 +242,7 @@ static int hinic3_tx_csum(struct hinic3_txq *txq, struct hinic3_sq_task *task, ip.hdr = skb_network_header(skb); if (ip.v4->version == 4) { l4_proto = ip.v4->protocol; - } else if (ip.v4->version == 6) { + } else if (ip.v6->version == 6) { union hinic3_l4 l4; unsigned char *exthdr; __be16 frag_off; -- 2.50.1