fix Ethernet input task error and add hardware-checksum for xidatong/ok1052-c/xiwangtong board

This commit is contained in:
Liu_Weichao 2023-07-20 11:13:33 +08:00
parent d663ca7193
commit 813b175ca3
8 changed files with 42 additions and 30 deletions

View File

@ -206,6 +206,7 @@ void ethernetif_input(void *netif_arg)
LWIP_ASSERT("netif != NULL", (netif != NULL));
while (1) {
/* move received packet into a new pbuf */
while ((p = ethernetif_linkinput(netif)) != NULL)
{
@ -219,6 +220,7 @@ void ethernetif_input(void *netif_arg)
}
}
}
}
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
{

View File

@ -364,6 +364,8 @@ void ethernetif_enet_init(struct netif *netif, struct ethernetif *ethernetif,
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
#endif /* USE_RTOS */
config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
/* Initialize the ENET module.*/
ENET_Init(ethernetif->base, &ethernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);

View File

@ -209,6 +209,7 @@ void ethernetif_input(void *netif_arg)
LWIP_ASSERT("netif != NULL", (netif != NULL));
while (1) {
/* move received packet into a new pbuf */
while ((p = ethernetif_linkinput(netif)) != NULL)
{
@ -222,6 +223,7 @@ void ethernetif_input(void *netif_arg)
}
}
}
}
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
{

View File

@ -363,6 +363,8 @@ void ethernetif_enet_init(struct netif *netif, struct ethernetif *ethernetif,
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
#endif /* USE_RTOS */
config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
/* Initialize the ENET module.*/
ENET_Init(ethernetif->base, &ethernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);

View File

@ -209,6 +209,7 @@ void ethernetif_input(void *netif_arg)
LWIP_ASSERT("netif != NULL", (netif != NULL));
while (1) {
/* move received packet into a new pbuf */
while ((p = ethernetif_linkinput(netif)) != NULL)
{
@ -222,6 +223,7 @@ void ethernetif_input(void *netif_arg)
}
}
}
}
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
{

View File

@ -363,6 +363,8 @@ void ethernetif_enet_init(struct netif *netif, struct ethernetif *ethernetif,
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
#endif /* USE_RTOS */
config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
/* Initialize the ENET module.*/
ENET_Init(ethernetif->base, &ethernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);

View File

@ -535,10 +535,10 @@ The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums
#define DEFAULT_ACCEPTMBOX_SIZE 10
#define DEFAULT_THREAD_PRIO 20
#define DEFAULT_THREAD_STACKSIZE 1024
#define DEFAULT_THREAD_STACKSIZE 2048
#define TCPIP_THREAD_NAME "tcp"
#define TCPIP_THREAD_STACKSIZE 1024
#define TCPIP_THREAD_STACKSIZE 2048
#define TCPIP_MBOX_SIZE 16
#define TCPIP_THREAD_PRIO 20

View File

@ -54,7 +54,7 @@
#define LWIP_TARGET_PORT LWIP_LOCAL_PORT
#define LWIP_DEMO_TIMES 10
#define LWIP_TASK_STACK_SIZE 1536
#define LWIP_TASK_STACK_SIZE 4096
#define LWIP_DEMO_TASK_PRIO 20
// /* MAC address configuration. */