summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-07 16:13:50 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-12-07 16:13:50 +0000
commit7b9c0155d6b254db6a316043fabcc9074ca0d1e0 (patch)
tree95a2cd144ea8774ccd517c537cbf560206d70312 /nuttx
parentb834ddada0e0b2c46c71e17fc7c9911d324f50d9 (diff)
downloadpx4-nuttx-7b9c0155d6b254db6a316043fabcc9074ca0d1e0.tar.gz
px4-nuttx-7b9c0155d6b254db6a316043fabcc9074ca0d1e0.tar.bz2
px4-nuttx-7b9c0155d6b254db6a316043fabcc9074ca0d1e0.zip
Clean compile with stats enabled
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@433 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_ethernet.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/nuttx/arch/arm/src/c5471/c5471_ethernet.c b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
index 5bf696680..e957eb970 100644
--- a/nuttx/arch/arm/src/c5471/c5471_ethernet.c
+++ b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
@@ -373,7 +373,13 @@ static int c5471_uiptxpoll(struct uip_driver_s *dev);
/* Interrupt handling */
+#ifdef CONFIG_C5471_NET_STATS
+static void c5471_rxstatus(struct c5471_driver_s *c5471);
+#endif
static void c5471_receive(struct c5471_driver_s *c5471);
+#ifdef CONFIG_C5471_NET_STATS
+static void c5471_txstatus(struct c5471_driver_s *c5471);
+#endif
static void c5471_txdone(struct c5471_driver_s *c5471);
static int c5471_interrupt(int irq, FAR void *context);
@@ -1064,7 +1070,7 @@ static int c5471_uiptxpoll(struct uip_driver_s *dev)
****************************************************************************/
#ifdef CONFIG_C5471_NET_STATS
-void c5471_rxstatus(int *numbytes)
+static void c5471_rxstatus(struct c5471_driver_s *c5471)
{
uint32 desc = c5471->c_txcpudesc;
uint32 rxstatus;
@@ -1340,7 +1346,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
****************************************************************************/
#ifdef CONFIG_C5471_NET_STATS
-static inline void c5471_txstatus(void)
+static void c5471_txstatus(struct c5471_driver_s *c5471)
{
uint32 desc = c5471->c_lastdescstart;
uint32 txstatus;
@@ -1416,6 +1422,7 @@ static inline void c5471_txstatus(void)
c5471->c_txalign++;
nvdbg("c_txalign: %d\n", c5471->c_txalign);
}
+ }
}
#endif
@@ -1437,12 +1444,6 @@ static inline void c5471_txstatus(void)
static void c5471_txdone(struct c5471_driver_s *c5471)
{
-#ifdef CONFIG_C5471_NET_STATS
- /* Check for TX errors */
-
- c5471_txstatus(c5471);
-#endif
-
/* If no further xmits are pending, then cancel the TX timeout */
wd_cancel(c5471->c_txtimeout);
@@ -1514,6 +1515,14 @@ static int c5471_interrupt(int irq, FAR void *context)
* terminology to stay consistent with the Orion documentation.
*/
+#ifdef CONFIG_C5471_NET_STATS
+ /* Check for TX errors */
+
+ c5471_txstatus(c5471);
+#endif
+
+ /* Handle the transmission done event */
+
c5471_txdone(c5471);
}