[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/busybox/src/libbb/inet_cksum.c b/ap/app/busybox/src/libbb/inet_cksum.c
new file mode 100644
index 0000000..3d5dc3a
--- /dev/null
+++ b/ap/app/busybox/src/libbb/inet_cksum.c
@@ -0,0 +1,36 @@
+/*
+ * Checksum routine for Internet Protocol family headers (C Version)
+ *
+ * Licensed under GPLv2, see file LICENSE in this source tree.
+ */
+
+#include "libbb.h"
+
+uint16_t FAST_FUNC inet_cksum(uint16_t *addr, int nleft)
+{
+	/*
+	 * Our algorithm is simple, using a 32 bit accumulator,
+	 * we add sequential 16 bit words to it, and at the end, fold
+	 * back all the carry bits from the top 16 bits into the lower
+	 * 16 bits.
+	 */
+	unsigned sum = 0;
+	while (nleft > 1) {
+		sum += *addr++;
+		nleft -= 2;
+	}
+
+	/* Mop up an odd byte, if necessary */
+	if (nleft == 1) {
+		if (BB_LITTLE_ENDIAN)
+			sum += *(uint8_t*)addr;
+		else
+			sum += *(uint8_t*)addr << 8;
+	}
+
+	/* Add back carry outs from top 16 bits to low 16 bits */
+	sum = (sum >> 16) + (sum & 0xffff);     /* add hi 16 to low 16 */
+	sum += (sum >> 16);                     /* add carry */
+
+	return (uint16_t)~sum;
+}