Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of lwip-eth by
Revision 29:4380f0749039, committed 2015-11-10
- Comitter:
- mbed_official
- Date:
- Tue Nov 10 09:31:00 2015 +0000
- Parent:
- 28:72f8b097fbf3
- Commit message:
- Synchronized with git revision 7218418919aeaf775fb8d386ea7ee0dfc0c80ff9
Full URL: https://github.com/mbedmicro/mbed/commit/7218418919aeaf775fb8d386ea7ee0dfc0c80ff9/
DISCO_F469NI - add disco F469NI support
Changed in this revision
| arch/TARGET_RZ_A1H/rza1_emac.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/arch/TARGET_RZ_A1H/rza1_emac.c Thu Aug 13 10:45:29 2015 +0100
+++ b/arch/TARGET_RZ_A1H/rza1_emac.c Tue Nov 10 09:31:00 2015 +0000
@@ -24,33 +24,38 @@
struct eth_hdr *ethhdr;
u16_t recv_size;
struct pbuf *p;
+ int cnt;
while (1) {
sys_arch_sem_wait(&recv_ready_sem, 0);
- recv_size = ethernet_receive();
- if (recv_size != 0) {
- p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_RAM);
- if (p != NULL) {
- (void)ethernet_read((char *)p->payload, p->len);
- ethhdr = p->payload;
- switch (htons(ethhdr->type)) {
- case ETHTYPE_IP:
- case ETHTYPE_ARP:
+ for (cnt = 0; cnt < 16; cnt++) {
+ recv_size = ethernet_receive();
+ if (recv_size != 0) {
+ p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_RAM);
+ if (p != NULL) {
+ (void)ethernet_read((char *)p->payload, p->len);
+ ethhdr = p->payload;
+ switch (htons(ethhdr->type)) {
+ case ETHTYPE_IP:
+ case ETHTYPE_ARP:
#if PPPOE_SUPPORT
- case ETHTYPE_PPPOEDISC:
- case ETHTYPE_PPPOE:
+ case ETHTYPE_PPPOEDISC:
+ case ETHTYPE_PPPOE:
#endif /* PPPOE_SUPPORT */
- /* full packet send to tcpip_thread to process */
- if (netif->input(p, netif) != ERR_OK) {
- /* Free buffer */
+ /* full packet send to tcpip_thread to process */
+ if (netif->input(p, netif) != ERR_OK) {
+ /* Free buffer */
+ pbuf_free(p);
+ }
+ break;
+ default:
+ /* Return buffer */
pbuf_free(p);
- }
- break;
- default:
- /* Return buffer */
- pbuf_free(p);
- break;
+ break;
+ }
}
+ } else {
+ break;
}
}
}
