forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/net/wireless/rockchip_wlan/cywdhd/bcmdhd/dhd_ip.h
....@@ -1,17 +1,18 @@
1
-/* SPDX-License-Identifier: GPL-2.0 */
21 /*
32 * Header file describing the common ip parser function.
43 *
54 * Provides type definitions and function prototypes used to parse ip packet.
65 *
7
- * Copyright (C) 1999-2019, Broadcom Corporation
8
- *
6
+ * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation
7
+ *
8
+ * Copyright (C) 1999-2017, Broadcom Corporation
9
+ *
910 * Unless you and Broadcom execute a separate written software license
1011 * agreement governing use of this software, this software is licensed to you
1112 * under the terms of the GNU General Public License version 2 (the "GPL"),
1213 * available at http://www.broadcom.com/licenses/GPLv2.php, with the
1314 * following added to such license:
14
- *
15
+ *
1516 * As a special exception, the copyright holders of this software give you
1617 * permission to link this software with independent modules, and to copy and
1718 * distribute the resulting executable under terms of your choice, provided that
....@@ -19,7 +20,7 @@
1920 * the license of that module. An independent module is a module which is not
2021 * derived from this software. The special exception does not apply to any
2122 * modifications of the software.
22
- *
23
+ *
2324 * Notwithstanding the above, under no circumstances may you combine this
2425 * software in any way with any other Broadcom software provided under a license
2526 * other than the GPL, without Broadcom's express prior written consent.
....@@ -27,17 +28,17 @@
2728 *
2829 * <<Broadcom-WL-IPTag/Open:>>
2930 *
30
- * $Id: dhd_ip.h 537119 2015-02-25 04:24:14Z $
31
+ * $Id: dhd_ip.h 536854 2015-02-24 13:17:29Z $
3132 */
3233
3334 #ifndef _dhd_ip_h_
3435 #define _dhd_ip_h_
3536
36
-#ifdef DHDTCPACK_SUPPRESS
37
+#if defined(DHDTCPACK_SUPPRESS) || defined(DHDTCPSYNC_FLOOD_BLK)
3738 #include <dngl_stats.h>
3839 #include <bcmutils.h>
3940 #include <dhd.h>
40
-#endif /* DHDTCPACK_SUPPRESS */
41
+#endif /* DHDTCPACK_SUPPRESS || DHDTCPSYNC_FLOOD_BLK */
4142
4243 typedef enum pkt_frag
4344 {
....@@ -49,6 +50,17 @@
4950
5051 extern pkt_frag_t pkt_frag_info(osl_t *osh, void *p);
5152
53
+#ifdef DHDTCPSYNC_FLOOD_BLK
54
+typedef enum tcp_hdr_flags {
55
+ FLAG_SYNC,
56
+ FLAG_SYNCACK,
57
+ FLAG_RST,
58
+ FLAG_OTHERS
59
+} tcp_hdr_flag_t;
60
+
61
+extern tcp_hdr_flag_t dhd_tcpdata_get_flag(dhd_pub_t *dhdp, void *pkt);
62
+#endif /* DHDTCPSYNC_FLOOD_BLK */
63
+
5264 #ifdef DHDTCPACK_SUPPRESS
5365 #define TCPACKSZMIN (ETHER_HDR_LEN + IPV4_MIN_HEADER_LEN + TCP_MIN_HEADER_LEN)
5466 /* Size of MAX possible TCP ACK packet. Extra bytes for IP/TCP option fields */
....@@ -57,7 +69,7 @@
5769 /* Max number of TCP streams that have own src/dst IP addrs and TCP ports */
5870 #define TCPACK_INFO_MAXNUM 4
5971 #define TCPDATA_INFO_MAXNUM 4
60
-#define TCPDATA_PSH_INFO_MAXNUM (16 * TCPDATA_INFO_MAXNUM)
72
+#define TCPDATA_PSH_INFO_MAXNUM (8 * TCPDATA_INFO_MAXNUM)
6173
6274 #define TCPDATA_INFO_TIMEOUT 5000 /* Remove tcpdata_info if inactive for this time (in ms) */
6375