lwip-eth

Fork of lwip-eth by mbed official

Revision:
28:72f8b097fbf3
Parent:
23:1283021a4a74
Child:
29:4380f0749039
--- a/arch/TARGET_RZ_A1H/rza1_emac.c	Mon Jun 15 07:15:45 2015 +0100
+++ b/arch/TARGET_RZ_A1H/rza1_emac.c	Thu Aug 13 10:45:29 2015 +0100
@@ -24,17 +24,14 @@
     struct eth_hdr *ethhdr;
     u16_t          recv_size;
     struct pbuf    *p;
-    struct pbuf    *q;
 
     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_POOL);
+            p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_RAM);
             if (p != NULL) {
-                for (q = p; q != NULL; q = q->next) {
-                    (void)ethernet_read((char *)q->payload, q->len);
-                }
+                (void)ethernet_read((char *)p->payload, p->len);
                 ethhdr = p->payload;
                 switch (htons(ethhdr->type)) {
                     case ETHTYPE_IP: