net: remove NET_ARCH_CHKSUM
authorEunBong Song <eunb.song@samsung.com>
Tue, 4 Apr 2017 05:29:09 +0000 (14:29 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:07 +0000 (12:02 +0900)
NET_ARCH_CHKSUM is a Nuttx uIP legacy feature and not used anymore.
This patch removes all related codes with NET_ARCH_CHKSUM.

Change-Id: Ia8e033e95c72731466efb63561fea41c30545b79
Signed-off-by: EunBong Song <eunb.song@samsung.com>
build/configs/artik053/nettest/defconfig
build/configs/sidk_s5jt200/sidk_tash_wlan/defconfig
os/include/tinyara/net/netdev.h
os/net/Kconfig
os/net/utils/Kconfig [deleted file]
os/net/utils/utils.h

index 43031d6..ea20ff7 100644 (file)
@@ -731,7 +731,6 @@ CONFIG_NET_IPv4=y
 # Network Device Operations
 #
 # CONFIG_NETDEV_PHY_IOCTL is not set
-# CONFIG_NET_ARCH_CHKSUM is not set
 
 #
 # Routing Table Configuration
index 9edfdf1..905064e 100755 (executable)
@@ -732,7 +732,6 @@ CONFIG_NET_IPv4=y
 # Network Device Operations
 #
 # CONFIG_NETDEV_PHY_IOCTL is not set
-# CONFIG_NET_ARCH_CHKSUM is not set
 
 #
 # Routing Table Configuration
index 40b29f0..43bfbb7 100644 (file)
@@ -395,54 +395,6 @@ int netdev_carrier_on(FAR struct net_driver_s *dev);
 int netdev_carrier_off(FAR struct net_driver_s *dev);
 
 /****************************************************************************
- * Name: net_chksum
- *
- * Description:
- *   Calculate the Internet checksum over a buffer.
- *
- *   The Internet checksum is the one's complement of the one's complement
- *   sum of all 16-bit words in the buffer.
- *
- *   See RFC1071.
- *
- *   If CONFIG_NET_ARCH_CHKSUM is defined, then this function must be
- *   provided by architecture-specific logic.
- *
- * Input Parameters:
- *
- *   buf - A pointer to the buffer over which the checksum is to be computed.
- *
- *   len - The length of the buffer over which the checksum is to be computed.
- *
- * Returned Value:
- *   The Internet checksum of the buffer.
- *
- ****************************************************************************/
-
-uint16_t net_chksum(FAR uint16_t *data, uint16_t len);
-
-/****************************************************************************
- * Name: ipv4_chksum
- *
- * Description:
- *   Calculate the IPv4 header checksum of the packet header in d_buf.
- *
- *   The IPv4 header checksum is the Internet checksum of the 20 bytes of
- *   the IPv4 header.
- *
- *   If CONFIG_NET_ARCH_CHKSUM is defined, then this function must be
- *   provided by architecture-specific logic.
- *
- * Returned Value:
- *   The IPv4 header checksum of the IPv4 header in the d_buf buffer.
- *
- ****************************************************************************/
-
-#ifdef CONFIG_NET_IPv4
-uint16_t ipv4_chksum(FAR struct net_driver_s *dev);
-#endif
-
-/****************************************************************************
  * Name: ipv6_chksum
  *
  * Description:
index 4961074..6f6a8d1 100644 (file)
@@ -123,7 +123,6 @@ config NET_IPv4
 endmenu # Internet Protocol Selection
 
 source net/netdev/Kconfig
-source net/utils/Kconfig
 source net/route/Kconfig
 
 endif # NET
diff --git a/os/net/utils/Kconfig b/os/net/utils/Kconfig
deleted file mode 100644 (file)
index f76a97f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
-#
-
-config NET_ARCH_CHKSUM
-       bool "Architecture-specific net_chksum()"
-       default n
-       ---help---
-               Define if you architecture provided an optimized version of
-               functions with the following prototypes:
-
-                       uint16_t net_chksum(FAR uint16_t *data, uint16_t len)
-                       uint16_t ipv4_chksum(FAR struct net_driver_s *dev)
-                       uint16_t tcp_ipv4_chksum(FAR struct net_driver_s *dev);
-                       uint16_t tcp_ipv6_chksum(FAR struct net_driver_s *dev);
-                       uint16_t udp_ipv4_chksum(FAR struct net_driver_s *dev);
-                       uint16_t udp_ipv6_chksum(FAR struct net_driver_s *dev);
index 2ee7f22..3e955e4 100644 (file)
@@ -172,42 +172,6 @@ unsigned int net_timeval2dsec(FAR struct timeval *tv);
 void net_ipv6_pref2mask(uint8_t preflen, net_ipv6addr_t mask);
 #endif
 
-/****************************************************************************
- * Name: tcp_chksum, tcp_ipv4_chksum, and tcp_ipv6_chksum
- *
- * Description:
- *   Calculate the TCP checksum of the packet in d_buf and d_appdata.
- *
- *   The TCP checksum is the Internet checksum of data contents of the
- *   TCP segment, and a pseudo-header as defined in RFC793.
- *
- *   Note: The d_appdata pointer that points to the packet data may
- *   point anywhere in memory, so it is not possible to simply calculate
- *   the Internet checksum of the contents of the d_buf buffer.
- *
- * Returned Value:
- *   The TCP checksum of the TCP segment in d_buf and pointed to by
- *   d_appdata.
- *
- ****************************************************************************/
-
-#ifdef CONFIG_NET_IPv4
-uint16_t tcp_ipv4_chksum(FAR struct net_driver_s *dev);
-#endif
-
-#ifdef CONFIG_NET_IPv6
-/* REVIST: Is this used? */
-uint16_t tcp_ipv6_chksum(FAR struct net_driver_s *dev);
-#endif
-
-#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
-uint16_t tcp_chksum(FAR struct net_driver_s *dev);
-#elif defined(CONFIG_NET_IPv4)
-#define tcp_chksum(d) tcp_ipv4_chksum(d)
-#else                                                  /* if defined(CONFIG_NET_IPv6) */
-#define tcp_chksum(d) tcp_ipv6_chksum(d)
-#endif
-
 #undef EXTERN
 #ifdef __cplusplus
 }