From 89b3ca3216c72caf0534f2f9660554198afdfe7e Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 10 Dec 2007 17:15:11 +0000 Subject: Release 0.3.4 git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@436 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/c5471/c5471_ethernet.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'nuttx/arch/arm/src/c5471/c5471_ethernet.c') diff --git a/nuttx/arch/arm/src/c5471/c5471_ethernet.c b/nuttx/arch/arm/src/c5471/c5471_ethernet.c index e957eb970..a36b51908 100644 --- a/nuttx/arch/arm/src/c5471/c5471_ethernet.c +++ b/nuttx/arch/arm/src/c5471/c5471_ethernet.c @@ -1082,7 +1082,7 @@ static void c5471_rxstatus(struct c5471_driver_s *c5471) { if (EIM_TXDESC_OWN_HOST & getreg32(desc)) { - /* The incoming packe queue is empty. */ + /* The incoming packet queue is empty. */ break; } @@ -1274,7 +1274,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) /* Set amount of data in c5471->c_dev.d_len. */ dev->d_len = packetlen; - nvdbg("Received packet, packetlen: %d type: %02x\n", packetlen, BUF->type); + nvdbg("Received packet, packetlen: %d type: %02x\n", packetlen, ntohs(BUF->type)); c5471_dumpbuffer(dev->d_buf, dev->d_len); /* We only accept IP packets of the configured type and ARP packets */ @@ -1286,7 +1286,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) #endif { uip_arp_ipin(); - uip_input(&c5471->c_dev); + uip_input(dev); /* If the above function invocation resulted in data that should be * sent out on the network, the field d_len will set to a value > 0. @@ -1294,16 +1294,16 @@ static void c5471_receive(struct c5471_driver_s *c5471) * access rights to submit another Ethernet frame. */ - if (c5471->c_dev.d_len > 0 && + if (dev->d_len > 0 && (EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0) { - uip_arp_out(&c5471->c_dev); + uip_arp_out(dev); c5471_transmit(c5471); } } - else if (BUF->type == htons(UIP_ETHTYPE_ARP)) + else if (BUF->type == HTONS(UIP_ETHTYPE_ARP)) { - uip_arp_arpin(&c5471->c_dev); + uip_arp_arpin(dev); /* If the above function invocation resulted in data that should be * sent out on the network, the field d_len will set to a value > 0. @@ -1311,7 +1311,7 @@ static void c5471_receive(struct c5471_driver_s *c5471) * access rights to submit another Ethernet frame. */ - if (c5471->c_dev.d_len > 0 && + if (dev->d_len > 0 && (EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0) { c5471_transmit(c5471); -- cgit v1.2.3