diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2007-12-07 16:13:50 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2007-12-07 16:13:50 +0000 |
commit | 7727a6019f8e1e5cf62273817be6c875acbf1805 (patch) | |
tree | 95a2cd144ea8774ccd517c537cbf560206d70312 /nuttx/arch/arm/src/c5471 | |
parent | a2e426d7c7cb6d47de707eb915078397c470c495 (diff) |
Clean compile with stats enabled
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@433 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch/arm/src/c5471')
-rw-r--r-- | nuttx/arch/arm/src/c5471/c5471_ethernet.c | 25 |
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 5bf696680b..e957eb9709 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); } |