summaryrefslogtreecommitdiff
path: root/nuttx/arch/z80/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-21 22:19:36 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-21 22:19:36 +0000
commit927317cd03dc9c9aa33a319e55b5aff06a1bd8d0 (patch)
tree0972a9cceb2857b05e0e4fcc8ba79e70f752b7e7 /nuttx/arch/z80/src
parentf8277441342420351279c57d083cd1244a6c7e6f (diff)
downloadpx4-nuttx-927317cd03dc9c9aa33a319e55b5aff06a1bd8d0.tar.gz
px4-nuttx-927317cd03dc9c9aa33a319e55b5aff06a1bd8d0.tar.bz2
px4-nuttx-927317cd03dc9c9aa33a319e55b5aff06a1bd8d0.zip
MAC driver development
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1813 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/z80/src')
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_emac.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/nuttx/arch/z80/src/ez80/ez80_emac.c b/nuttx/arch/z80/src/ez80/ez80_emac.c
index 4aff6f553..0e557564d 100644
--- a/nuttx/arch/z80/src/ez80/ez80_emac.c
+++ b/nuttx/arch/z80/src/ez80/ez80_emac.c
@@ -955,7 +955,7 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv)
flags = irqsave();
EMAC_STAT(priv, tx_packets);
- /* The current packet to be sent is txnetx; Calculate the new txnext and
+ /* The current packet to be sent is txnext; Calculate the new txnext and
* set the ownership to host so that the EMAC does not try to transmit
* the next packet.
*
@@ -967,10 +967,10 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv)
*/
txdesc = priv->txnext;
-
+
len = EMAC_PKTBUF_ALIGN(priv->dev.d_len + SIZEOF_EMACSDESC);
txnext = (FAR struct ez80emac_desc_s *)((ubyte*)txdesc + len);
-
+
/* Handle wraparound to the beginning of the TX region */
if ((ubyte*)txnext + SIZEOF_EMACSDESC >= (ubyte*)priv->rxstart)
@@ -1070,6 +1070,10 @@ static int ez80emac_uiptxpoll(struct uip_driver_s *dev)
nvdbg("Poll result: d_len=%d\n", priv->dev.d_len);
if (priv->dev.d_len > 0)
{
+ /* Send the packet. ez80emac_transmit() will return zero if the
+ * packet was successfully handled.
+ */
+
uip_arp_out(&priv->dev);
ret = ez80emac_transmit(priv);
}