forked from xuos/xiuos
fix Ethernet input task error and add hardware-checksum for xidatong/ok1052-c/xiwangtong board
This commit is contained in:
parent
d663ca7193
commit
813b175ca3
|
@ -206,6 +206,7 @@ void ethernetif_input(void *netif_arg)
|
||||||
|
|
||||||
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
||||||
|
|
||||||
|
while (1) {
|
||||||
/* move received packet into a new pbuf */
|
/* move received packet into a new pbuf */
|
||||||
while ((p = ethernetif_linkinput(netif)) != NULL)
|
while ((p = ethernetif_linkinput(netif)) != NULL)
|
||||||
{
|
{
|
||||||
|
@ -218,6 +219,7 @@ void ethernetif_input(void *netif_arg)
|
||||||
p = NULL;
|
p = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
|
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
|
||||||
|
|
|
@ -364,6 +364,8 @@ void ethernetif_enet_init(struct netif *netif, struct ethernetif *ethernetif,
|
||||||
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
|
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
|
||||||
#endif /* USE_RTOS */
|
#endif /* USE_RTOS */
|
||||||
|
|
||||||
|
config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
|
||||||
|
|
||||||
/* Initialize the ENET module.*/
|
/* Initialize the ENET module.*/
|
||||||
ENET_Init(ethernetif->base, ðernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);
|
ENET_Init(ethernetif->base, ðernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,7 @@ void ethernetif_input(void *netif_arg)
|
||||||
|
|
||||||
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
||||||
|
|
||||||
|
while (1) {
|
||||||
/* move received packet into a new pbuf */
|
/* move received packet into a new pbuf */
|
||||||
while ((p = ethernetif_linkinput(netif)) != NULL)
|
while ((p = ethernetif_linkinput(netif)) != NULL)
|
||||||
{
|
{
|
||||||
|
@ -221,6 +222,7 @@ void ethernetif_input(void *netif_arg)
|
||||||
p = NULL;
|
p = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
|
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
|
||||||
|
|
|
@ -363,6 +363,8 @@ void ethernetif_enet_init(struct netif *netif, struct ethernetif *ethernetif,
|
||||||
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
|
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
|
||||||
#endif /* USE_RTOS */
|
#endif /* USE_RTOS */
|
||||||
|
|
||||||
|
config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
|
||||||
|
|
||||||
/* Initialize the ENET module.*/
|
/* Initialize the ENET module.*/
|
||||||
ENET_Init(ethernetif->base, ðernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);
|
ENET_Init(ethernetif->base, ðernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,7 @@ void ethernetif_input(void *netif_arg)
|
||||||
|
|
||||||
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
LWIP_ASSERT("netif != NULL", (netif != NULL));
|
||||||
|
|
||||||
|
while (1) {
|
||||||
/* move received packet into a new pbuf */
|
/* move received packet into a new pbuf */
|
||||||
while ((p = ethernetif_linkinput(netif)) != NULL)
|
while ((p = ethernetif_linkinput(netif)) != NULL)
|
||||||
{
|
{
|
||||||
|
@ -221,6 +222,7 @@ void ethernetif_input(void *netif_arg)
|
||||||
p = NULL;
|
p = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
|
static ENET_Type *ethernetif_get_enet_base(const uint8_t enetIdx)
|
||||||
|
|
|
@ -363,6 +363,8 @@ void ethernetif_enet_init(struct netif *netif, struct ethernetif *ethernetif,
|
||||||
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
|
LWIP_ASSERT("Input Ethernet base error!", (instance != ARRAY_SIZE(enetBases)));
|
||||||
#endif /* USE_RTOS */
|
#endif /* USE_RTOS */
|
||||||
|
|
||||||
|
config.txAccelerConfig = kENET_TxAccelIpCheckEnabled | kENET_TxAccelProtoCheckEnabled;
|
||||||
|
|
||||||
/* Initialize the ENET module.*/
|
/* Initialize the ENET module.*/
|
||||||
ENET_Init(ethernetif->base, ðernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);
|
ENET_Init(ethernetif->base, ðernetif->handle, &config, &buffCfg[0], netif->hwaddr, sysClock);
|
||||||
|
|
||||||
|
|
|
@ -535,10 +535,10 @@ The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums
|
||||||
#define DEFAULT_ACCEPTMBOX_SIZE 10
|
#define DEFAULT_ACCEPTMBOX_SIZE 10
|
||||||
|
|
||||||
#define DEFAULT_THREAD_PRIO 20
|
#define DEFAULT_THREAD_PRIO 20
|
||||||
#define DEFAULT_THREAD_STACKSIZE 1024
|
#define DEFAULT_THREAD_STACKSIZE 2048
|
||||||
|
|
||||||
#define TCPIP_THREAD_NAME "tcp"
|
#define TCPIP_THREAD_NAME "tcp"
|
||||||
#define TCPIP_THREAD_STACKSIZE 1024
|
#define TCPIP_THREAD_STACKSIZE 2048
|
||||||
#define TCPIP_MBOX_SIZE 16
|
#define TCPIP_MBOX_SIZE 16
|
||||||
#define TCPIP_THREAD_PRIO 20
|
#define TCPIP_THREAD_PRIO 20
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
#define LWIP_TARGET_PORT LWIP_LOCAL_PORT
|
#define LWIP_TARGET_PORT LWIP_LOCAL_PORT
|
||||||
|
|
||||||
#define LWIP_DEMO_TIMES 10
|
#define LWIP_DEMO_TIMES 10
|
||||||
#define LWIP_TASK_STACK_SIZE 1536
|
#define LWIP_TASK_STACK_SIZE 4096
|
||||||
#define LWIP_DEMO_TASK_PRIO 20
|
#define LWIP_DEMO_TASK_PRIO 20
|
||||||
|
|
||||||
// /* MAC address configuration. */
|
// /* MAC address configuration. */
|
||||||
|
|
Loading…
Reference in New Issue