net/netdev: modify for hardware checksum offload

Implementation of main hardware verification and uninstallation functions

Signed-off-by: daichuan <daichuan@xiaomi.com>
This commit is contained in:
daichuan
2025-08-30 01:17:47 +08:00
committed by Xiang Xiao
parent 9903b11656
commit d2dde8a29a
9 changed files with 287 additions and 10 deletions
+2 -1
View File
@@ -447,7 +447,8 @@ static int ipv4_in(FAR struct net_driver_s *dev)
#endif
#ifdef CONFIG_NET_IPV4_CHECKSUMS
if (ipv4_chksum(IPv4BUF) != 0xffff)
if (((dev->d_features & NETDEV_RX_CSUM) == 0)
&& (ipv4_chksum(IPv4BUF) != 0xffff))
{
/* Compute and check the IP header checksum. */