aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/lwip/src/netif/undiif.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/core/lwip/src/netif/undiif.c b/core/lwip/src/netif/undiif.c
index 6abc7a2f..01a021d5 100644
--- a/core/lwip/src/netif/undiif.c
+++ b/core/lwip/src/netif/undiif.c
@@ -136,8 +136,6 @@ low_level_output(struct netif *netif, struct pbuf *p)
pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */
#endif
- memset(&pxe, 0, sizeof pxe);
-
r = pkt_buf;
for (q = p; q != NULL; q = q->next) {
/* Send the data from the pbuf to the interface, one pbuf at a
@@ -147,15 +145,19 @@ low_level_output(struct netif *netif, struct pbuf *p)
r += q->len;
}
- pxe.xmit.Protocol = 0; /* XXX: P_UNKNOWN: MAC layer */
- pxe.xmit.XmitFlag = !memcmp(pkt_buf, eth_broadcast, sizeof eth_broadcast);
- pxe.xmit.DestAddr = FAR_PTR(pkt_buf);
- pxe.xmit.TBD = FAR_PTR(&pxe.tbd);
- pxe.tbd.ImmedLength = r - pkt_buf;
- pxe.tbd.Xmit = FAR_PTR(pkt_buf);
- pxe.tbd.DataBlkCount = 0;
-
- pxe_call(PXENV_UNDI_TRANSMIT, &pxe.xmit);
+ do {
+ memset(&pxe, 0, sizeof pxe);
+
+ pxe.xmit.Protocol = 0; /* XXX: P_UNKNOWN: MAC layer */
+ pxe.xmit.XmitFlag = !memcmp(pkt_buf, eth_broadcast, sizeof eth_broadcast);
+ pxe.xmit.DestAddr = FAR_PTR(pkt_buf);
+ pxe.xmit.TBD = FAR_PTR(&pxe.tbd);
+ pxe.tbd.ImmedLength = r - pkt_buf;
+ pxe.tbd.Xmit = FAR_PTR(pkt_buf);
+ pxe.tbd.DataBlkCount = 0;
+
+ pxe_call(PXENV_UNDI_TRANSMIT, &pxe.xmit);
+ } while (pxe.xmit.Status == PXENV_STATUS_OUT_OF_RESOURCES);
#if ETH_PAD_SIZE
pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */