summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/c5471
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-10 17:15:11 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-10 17:15:11 +0000
commit89b3ca3216c72caf0534f2f9660554198afdfe7e (patch)
tree3fb1a52ef7453a3bcfa44506b1934cc7be903cdd /nuttx/arch/arm/src/c5471
parentc63a13af0b0ab849d62890c00d09ff1fab754141 (diff)
downloadpx4-nuttx-89b3ca3216c72caf0534f2f9660554198afdfe7e.tar.gz
px4-nuttx-89b3ca3216c72caf0534f2f9660554198afdfe7e.tar.bz2
px4-nuttx-89b3ca3216c72caf0534f2f9660554198afdfe7e.zip
Release 0.3.4nuttx-3.4
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@436 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/c5471')
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_ethernet.c16
1 files changed, 8 insertions, 8 deletions
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);