Modify the format of code

We modified the format of code.
pull/1404/head
tomoyuki yamanaka 2015-11-02 17:50:04 +09:00
parent 3d708b73dd
commit c3c389744e
1 changed files with 21 additions and 21 deletions

View File

@ -29,30 +29,30 @@ static void rza1_recv_task(void *arg) {
while (1) { while (1) {
sys_arch_sem_wait(&recv_ready_sem, 0); sys_arch_sem_wait(&recv_ready_sem, 0);
for (cnt = 0; cnt < 16; cnt++) { for (cnt = 0; cnt < 16; cnt++) {
recv_size = ethernet_receive(); recv_size = ethernet_receive();
if (recv_size != 0) { if (recv_size != 0) {
p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_RAM); p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_RAM);
if (p != NULL) { if (p != NULL) {
(void)ethernet_read((char *)p->payload, p->len); (void)ethernet_read((char *)p->payload, p->len);
ethhdr = p->payload; ethhdr = p->payload;
switch (htons(ethhdr->type)) { switch (htons(ethhdr->type)) {
case ETHTYPE_IP: case ETHTYPE_IP:
case ETHTYPE_ARP: case ETHTYPE_ARP:
#if PPPOE_SUPPORT #if PPPOE_SUPPORT
case ETHTYPE_PPPOEDISC: case ETHTYPE_PPPOEDISC:
case ETHTYPE_PPPOE: case ETHTYPE_PPPOE:
#endif /* PPPOE_SUPPORT */ #endif /* PPPOE_SUPPORT */
/* full packet send to tcpip_thread to process */ /* full packet send to tcpip_thread to process */
if (netif->input(p, netif) != ERR_OK) { if (netif->input(p, netif) != ERR_OK) {
/* Free buffer */ /* Free buffer */
pbuf_free(p);
}
break;
default:
/* Return buffer */
pbuf_free(p); pbuf_free(p);
} break;
break; }
default:
/* Return buffer */
pbuf_free(p);
break;
}
} }
} else { } else {
break; break;