summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/renesas/ravb_main.c
diff options
context:
space:
mode:
authorPaul Barker <paul.barker.ct@bp.renesas.com>2024-10-15 14:36:31 +0100
committerAndrew Lunn <andrew@lunn.ch>2024-10-17 21:24:24 -0500
commite63b5fd02a00aab8e79691359e931dafcd9dfd05 (patch)
tree3275dc215ad7f1d605ec8a78e3c55165af16ef5b /drivers/net/ethernet/renesas/ravb_main.c
parent4574ba5b711d7f7968c116521ef58d46fd4f89b1 (diff)
net: ravb: Simplify UDP TX checksum offload
The GbEth IP will pass through a zero UDP checksum without asserting any error flags so we do not need to resort to software checksum calculation in this case. Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb_main.c')
-rw-r--r--drivers/net/ethernet/renesas/ravb_main.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index ca8f785b96b4..80c0d36bffcb 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -2075,20 +2075,11 @@ static bool ravb_can_tx_csum_gbeth(struct sk_buff *skb)
switch (ip->protocol) {
case IPPROTO_TCP:
- break;
case IPPROTO_UDP:
- /* If the checksum value in the UDP header field is 0, TOE does
- * not calculate checksum for UDP part of this frame as it is
- * optional function as per standards.
- */
- if (udp_hdr(skb)->check == 0)
- return false;
- break;
+ return true;
default:
return false;
}
-
- return true;
}
/* Packet transmit function for Ethernet AVB */