|
|
@@ -48,8 +48,8 @@
|
|
|
#include "lwip/stats.h"
|
|
|
#include "lwip/icmp.h"
|
|
|
|
|
|
-#include <string.h>
|
|
|
-
|
|
|
+#include <stdio.h>
|
|
|
+#include "util/sys_util.h"
|
|
|
#if IP_REASSEMBLY
|
|
|
/**
|
|
|
* The IP reassembly code currently has the following limitations:
|
|
|
@@ -677,7 +677,6 @@ ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest)
|
|
|
left = p->tot_len - IP_HLEN;
|
|
|
|
|
|
nfb = (mtu - IP_HLEN) / 8;
|
|
|
-
|
|
|
while (left) {
|
|
|
last = (left <= mtu - IP_HLEN);
|
|
|
|
|
|
@@ -756,6 +755,7 @@ ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest)
|
|
|
if (header != NULL) {
|
|
|
pbuf_chain(header, rambuf);
|
|
|
netif->output(netif, header, dest);
|
|
|
+ delay_us(100);//保证DMA发送完数据包
|
|
|
IPFRAG_STATS_INC(ip_frag.xmit);
|
|
|
snmp_inc_ipfragcreates();
|
|
|
pbuf_free(header);
|
|
|
@@ -769,6 +769,7 @@ ip_frag(struct pbuf *p, struct netif *netif, struct ip_addr *dest)
|
|
|
* when allocated.
|
|
|
*/
|
|
|
netif->output(netif, rambuf, dest);
|
|
|
+ delay_us(300);//保证DMA发送完数据包
|
|
|
IPFRAG_STATS_INC(ip_frag.xmit);
|
|
|
|
|
|
/* Unfortunately we can't reuse rambuf - the hardware may still be
|