diff options
| author | zylx <[email protected]> | 2019-03-14 16:35:33 +0800 |
|---|---|---|
| committer | zylx <[email protected]> | 2019-03-14 16:39:50 +0800 |
| commit | 9818ee2d2908ffa9c1286484863a7a1ebe3c2f8e (patch) | |
| tree | 16527fe21c11ff1010538b6a2c0589377baac607 /components | |
| parent | cdb469cee9740e155ee51d00c0fa49a3d93f5b11 (diff) | |
[components][lwip]添加 LWIP 硬件校验和选项,修改 STM32 系列和 rt1052 系列以太网驱动,支持硬件校验和
Diffstat (limited to 'components')
| -rw-r--r-- | components/net/Kconfig | 4 | ||||
| -rw-r--r-- | components/net/lwip-2.0.2/src/lwipopts.h | 12 | ||||
| -rw-r--r-- | components/net/lwip-2.1.0/src/lwipopts.h | 12 |
3 files changed, 28 insertions, 0 deletions
diff --git a/components/net/Kconfig b/components/net/Kconfig index cef3ceacd3..cfeaca5a51 100644 --- a/components/net/Kconfig +++ b/components/net/Kconfig @@ -261,6 +261,10 @@ config RT_USING_LWIP bool "Enable lwIP statistics" default n + config RT_LWIP_USING_HW_CHECKSUM + bool "Enable hardware checksum" + default n + menuconfig RT_LWIP_DEBUG bool "Enable lwIP Debugging Options" default n diff --git a/components/net/lwip-2.0.2/src/lwipopts.h b/components/net/lwip-2.0.2/src/lwipopts.h index 07901c3fa1..f90ef1a825 100644 --- a/components/net/lwip-2.0.2/src/lwipopts.h +++ b/components/net/lwip-2.0.2/src/lwipopts.h @@ -383,6 +383,18 @@ #define ARP_TABLE_SIZE 10 #define ARP_QUEUEING 1 +/* ---------- Checksum options ---------- */ +#ifdef RT_LWIP_USING_HW_CHECKSUM +#define CHECKSUM_GEN_IP 0 +#define CHECKSUM_GEN_UDP 0 +#define CHECKSUM_GEN_TCP 0 +#define CHECKSUM_GEN_ICMP 0 +#define CHECKSUM_CHECK_IP 0 +#define CHECKSUM_CHECK_UDP 0 +#define CHECKSUM_CHECK_TCP 0 +#define CHECKSUM_CHECK_ICMP 0 +#endif + /* ---------- IP options ---------- */ /* Define IP_FORWARD to 1 if you wish to have the ability to forward IP packets across network interfaces. If you are going to run lwIP diff --git a/components/net/lwip-2.1.0/src/lwipopts.h b/components/net/lwip-2.1.0/src/lwipopts.h index 4e65fd65ba..405e95ce64 100644 --- a/components/net/lwip-2.1.0/src/lwipopts.h +++ b/components/net/lwip-2.1.0/src/lwipopts.h @@ -390,6 +390,18 @@ #define ARP_TABLE_SIZE 10 #define ARP_QUEUEING 1 +/* ---------- Checksum options ---------- */ +#ifdef RT_LWIP_USING_HW_CHECKSUM +#define CHECKSUM_GEN_IP 0 +#define CHECKSUM_GEN_UDP 0 +#define CHECKSUM_GEN_TCP 0 +#define CHECKSUM_GEN_ICMP 0 +#define CHECKSUM_CHECK_IP 0 +#define CHECKSUM_CHECK_UDP 0 +#define CHECKSUM_CHECK_TCP 0 +#define CHECKSUM_CHECK_ICMP 0 +#endif + /* ---------- IP options ---------- */ /* Define IP_FORWARD to 1 if you wish to have the ability to forward IP packets across network interfaces. If you are going to run lwIP |
