Replace confusing references to uIP with just 'the network'

This commit is contained in:
Gregory Nutt
2016-05-30 09:37:34 -06:00
parent 4f208600aa
commit 44353f320c
9 changed files with 81 additions and 81 deletions
+6 -6
View File
@@ -314,7 +314,7 @@ static int cs89x0_transmit(struct cs89x0_driver_s *cs89x0)
* Function: cs89x0_txpoll * Function: cs89x0_txpoll
* *
* Description: * Description:
* The transmitter is available, check if uIP has any outgoing packets ready * The transmitter is available, check if the network has any outgoing packets ready
* to send. This is a callback from devif_poll(). devif_poll() may be called: * to send. This is a callback from devif_poll(). devif_poll() may be called:
* *
* 1. When the preceding TX packet send is complete, * 1. When the preceding TX packet send is complete,
@@ -436,7 +436,7 @@ static void cs89x0_receive(FAR struct cs89x0_driver_s *cs89x0, uint16_t isq)
return; return;
} }
/* Check if the packet is a valid size for the uIP buffer configuration */ /* Check if the packet is a valid size for the network buffer configuration */
if (rxlength > ???) if (rxlength > ???)
{ {
@@ -618,7 +618,7 @@ static void cs89x0_txdone(struct cs89x0_driver_s *cs89x0, uint16_t isq)
wd_cancel(cs89x0->cs_txtimeout); wd_cancel(cs89x0->cs_txtimeout);
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll); (void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll);
} }
@@ -759,7 +759,7 @@ static void cs89x0_txtimeout(int argc, uint32_t arg, ...)
/* Then reset the hardware */ /* Then reset the hardware */
#warning "Missing logic" #warning "Missing logic"
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll); (void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll);
} }
@@ -788,7 +788,7 @@ static void cs89x0_polltimer(int argc, uint32_t arg, ...)
/* Check if there is room in the send another TXr packet. */ /* Check if there is room in the send another TXr packet. */
#warning "Missing logic" #warning "Missing logic"
/* If so, update TCP timing states and poll uIP for new XMIT data */ /* If so, update TCP timing states and poll the network for new XMIT data */
(void)devif_timer(&cs89x0->cs_dev, cs89x0_txpoll); (void)devif_timer(&cs89x0->cs_dev, cs89x0_txpoll);
@@ -909,7 +909,7 @@ static int cs89x0_txavail(struct net_driver_s *dev)
/* Check if there is room in the hardware to hold another outgoing packet. */ /* Check if there is room in the hardware to hold another outgoing packet. */
#warning "Missing logic" #warning "Missing logic"
/* If so, then poll uIP for new XMIT data */ /* If so, then poll the network for new XMIT data */
(void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll); (void)devif_poll(&cs89x0->cs_dev, cs89x0_txpoll);
} }
+8 -8
View File
@@ -309,7 +309,7 @@ struct dm9x_driver_s
void (*dm_write)(const uint8_t *ptr, int len); void (*dm_write)(const uint8_t *ptr, int len);
void (*dm_discard)(int len); void (*dm_discard)(int len);
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s dm_dev; struct net_driver_s dm_dev;
}; };
@@ -737,7 +737,7 @@ static int dm9x_transmit(struct dm9x_driver_s *dm9x)
* Function: dm9x_txpoll * Function: dm9x_txpoll
* *
* Description: * Description:
* The transmitter is available, check if uIP has any outgoing packets ready * The transmitter is available, check if the network has any outgoing packets ready
* to send. This is a callback from devif_poll(). devif_poll() may be called: * to send. This is a callback from devif_poll(). devif_poll() may be called:
* *
* 1. When the preceding TX packet send is complete, * 1. When the preceding TX packet send is complete,
@@ -873,7 +873,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x)
dm9x->dm_discard(rx.desc.rx_len); dm9x->dm_discard(rx.desc.rx_len);
} }
/* Also check if the packet is a valid size for the uIP configuration */ /* Also check if the packet is a valid size for the network configuration */
else if (rx.desc.rx_len < ETH_HDRLEN || rx.desc.rx_len > (CONFIG_NET_ETH_MTU + 2)) else if (rx.desc.rx_len < ETH_HDRLEN || rx.desc.rx_len > (CONFIG_NET_ETH_MTU + 2))
{ {
@@ -886,7 +886,7 @@ static void dm9x_receive(FAR struct dm9x_driver_s *dm9x)
} }
else else
{ {
/* Good packet... Copy the packet data out of SRAM and pass it one to uIP */ /* Good packet... Copy the packet data out of SRAM and pass it one to the network */
dm9x->dm_dev.d_len = rx.desc.rx_len; dm9x->dm_dev.d_len = rx.desc.rx_len;
dm9x->dm_read(dm9x->dm_dev.d_buf, rx.desc.rx_len); dm9x->dm_read(dm9x->dm_dev.d_buf, rx.desc.rx_len);
@@ -1065,7 +1065,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x)
wd_cancel(dm9x->dm_txtimeout); wd_cancel(dm9x->dm_txtimeout);
} }
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&dm9x->dm_dev, dm9x_txpoll); (void)devif_poll(&dm9x->dm_dev, dm9x_txpoll);
} }
@@ -1222,7 +1222,7 @@ static void dm9x_txtimeout(int argc, uint32_t arg, ...)
dm9x_reset(dm9x); dm9x_reset(dm9x);
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&dm9x->dm_dev, dm9x_txpoll); (void)devif_poll(&dm9x->dm_dev, dm9x_txpoll);
} }
@@ -1264,7 +1264,7 @@ static void dm9x_polltimer(int argc, uint32_t arg, ...)
if (dm9x->dm_ntxpending < 1 || (dm9x->dm_b100M && dm9x->dm_ntxpending < 2)) if (dm9x->dm_ntxpending < 1 || (dm9x->dm_b100M && dm9x->dm_ntxpending < 2))
{ {
/* If so, update TCP timing states and poll uIP for new XMIT data */ /* If so, update TCP timing states and poll the network for new XMIT data */
(void)devif_timer(&dm9x->dm_dev, dm9x_txpoll); (void)devif_timer(&dm9x->dm_dev, dm9x_txpoll);
} }
@@ -1470,7 +1470,7 @@ static int dm9x_txavail(struct net_driver_s *dev)
if (dm9x->dm_ntxpending < 1 || (dm9x->dm_b100M && dm9x->dm_ntxpending < 2)) if (dm9x->dm_ntxpending < 1 || (dm9x->dm_b100M && dm9x->dm_ntxpending < 2))
{ {
/* If so, then poll uIP for new XMIT data */ /* If so, then poll the network for new XMIT data */
(void)devif_poll(&dm9x->dm_dev, dm9x_txpoll); (void)devif_poll(&dm9x->dm_dev, dm9x_txpoll);
} }
+5 -5
View File
@@ -127,7 +127,7 @@ struct e1000_dev
WDOG_ID txpoll; /* TX poll timer */ WDOG_ID txpoll; /* TX poll timer */
WDOG_ID txtimeout; /* TX timeout timer */ WDOG_ID txtimeout; /* TX timeout timer */
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s netdev; /* Interface understood by networking layer */ struct net_driver_s netdev; /* Interface understood by networking layer */
}; };
@@ -462,7 +462,7 @@ static int e1000_transmit(struct e1000_dev *e1000)
* Function: e1000_txpoll * Function: e1000_txpoll
* *
* Description: * Description:
* The transmitter is available, check if uIP has any outgoing packets ready * The transmitter is available, check if the network has any outgoing packets ready
* to send. This is a callback from devif_poll(). devif_poll() may be called: * to send. This is a callback from devif_poll(). devif_poll() may be called:
* *
* 1. When the preceding TX packet send is complete, * 1. When the preceding TX packet send is complete,
@@ -570,7 +570,7 @@ static void e1000_receive(struct e1000_dev *e1000)
goto next; goto next;
} }
/* Check if the packet is a valid size for the uIP buffer configuration */ /* Check if the packet is a valid size for the network buffer configuration */
/* get the number of actual data-bytes in this packet */ /* get the number of actual data-bytes in this packet */
@@ -728,7 +728,7 @@ static void e1000_txtimeout(int argc, uint32_t arg, ...)
e1000_init(e1000); e1000_init(e1000);
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&e1000->netdev, e1000_txpoll); (void)devif_poll(&e1000->netdev, e1000_txpoll);
} }
@@ -765,7 +765,7 @@ static void e1000_polltimer(int argc, uint32_t arg, ...)
return; return;
} }
/* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm..
* might be bug here. Does this mean if there is a transmit in progress, * might be bug here. Does this mean if there is a transmit in progress,
* we will missing TCP time state updates? * we will missing TCP time state updates?
*/ */
+19 -19
View File
@@ -252,9 +252,9 @@ struct enc_driver_s
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s dev; /* Interface understood by uIP */ struct net_driver_s dev; /* Interface understood by the network */
}; };
/**************************************************************************** /****************************************************************************
@@ -1154,7 +1154,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv)
* Function: enc_txpoll * Function: enc_txpoll
* *
* Description: * Description:
* The transmitter is available, check if uIP has any outgoing packets ready * The transmitter is available, check if the network has any outgoing packets ready
* to send. This is a callback from devif_poll(). devif_poll() may be called: * to send. This is a callback from devif_poll(). devif_poll() may be called:
* *
* 1. When the preceding TX packet send is complete, * 1. When the preceding TX packet send is complete,
@@ -1168,7 +1168,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv)
* OK on success; a negated errno on failure * OK on success; a negated errno on failure
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1261,7 +1261,7 @@ static void enc_linkstatus(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1288,7 +1288,7 @@ static void enc_txif(FAR struct enc_driver_s *priv)
(void)wd_start(priv->txpoll, ENC_WDDELAY, enc_polltimer, 1, (void)wd_start(priv->txpoll, ENC_WDDELAY, enc_polltimer, 1,
(wdparm_t)priv); (wdparm_t)priv);
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&priv->dev, enc_txpoll); (void)devif_poll(&priv->dev, enc_txpoll);
} }
@@ -1362,7 +1362,7 @@ static void enc_rxerif(FAR struct enc_driver_s *priv)
* Function: enc_rxdispatch * Function: enc_rxdispatch
* *
* Description: * Description:
* Give the newly received packet to uIP. * Give the newly received packet to the network.
* *
* Parameters: * Parameters:
* priv - Reference to the driver state structure * priv - Reference to the driver state structure
@@ -1371,7 +1371,7 @@ static void enc_rxerif(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1502,7 +1502,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1578,7 +1578,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
enc_rdbuffer(priv, priv->dev.d_buf, priv->dev.d_len); enc_rdbuffer(priv, priv->dev.d_buf, priv->dev.d_len);
enc_dumppacket("Received Packet", priv->dev.d_buf, priv->dev.d_len); enc_dumppacket("Received Packet", priv->dev.d_buf, priv->dev.d_len);
/* Dispatch the packet to uIP */ /* Dispatch the packet to the network */
enc_rxdispatch(priv); enc_rxdispatch(priv);
} }
@@ -1620,7 +1620,7 @@ static void enc_irqworker(FAR void *arg)
DEBUGASSERT(priv); DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */ /* Get exclusive access to both the network and the SPI bus. */
lock = net_lock(); lock = net_lock();
enc_lock(priv); enc_lock(priv);
@@ -1810,7 +1810,7 @@ static void enc_irqworker(FAR void *arg)
enc_bfsgreg(priv, ENC_EIE, EIE_INTIE); enc_bfsgreg(priv, ENC_EIE, EIE_INTIE);
/* Release lock on the SPI bus and uIP */ /* Release lock on the SPI bus and the network */
enc_unlock(priv); enc_unlock(priv);
net_unlock(lock); net_unlock(lock);
@@ -1881,7 +1881,7 @@ static void enc_toworker(FAR void *arg)
nlldbg("Tx timeout\n"); nlldbg("Tx timeout\n");
DEBUGASSERT(priv); DEBUGASSERT(priv);
/* Get exclusive access to uIP */ /* Get exclusive access to the network */
lock = net_lock(); lock = net_lock();
@@ -1899,11 +1899,11 @@ static void enc_toworker(FAR void *arg)
DEBUGASSERT(ret == OK); DEBUGASSERT(ret == OK);
UNUSED(ret); UNUSED(ret);
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&priv->dev, enc_txpoll); (void)devif_poll(&priv->dev, enc_txpoll);
/* Release lock on uIP */ /* Release lock on the network */
net_unlock(lock); net_unlock(lock);
} }
@@ -1973,7 +1973,7 @@ static void enc_pollworker(FAR void *arg)
DEBUGASSERT(priv); DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */ /* Get exclusive access to both the network and the SPI bus. */
lock = net_lock(); lock = net_lock();
enc_lock(priv); enc_lock(priv);
@@ -1986,7 +1986,7 @@ static void enc_pollworker(FAR void *arg)
if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0)
{ {
/* Yes.. update TCP timing states and poll uIP for new XMIT data. Hmmm.. /* Yes.. update TCP timing states and poll the network for new XMIT data. Hmmm..
* looks like a bug here to me. Does this mean if there is a transmit * looks like a bug here to me. Does this mean if there is a transmit
* in progress, we will missing TCP time state updates? * in progress, we will missing TCP time state updates?
*/ */
@@ -1994,7 +1994,7 @@ static void enc_pollworker(FAR void *arg)
(void)devif_timer(&priv->dev, enc_txpoll); (void)devif_timer(&priv->dev, enc_txpoll);
} }
/* Release lock on the SPI bus and uIP */ /* Release lock on the SPI bus and the network */
enc_unlock(priv); enc_unlock(priv);
net_unlock(lock); net_unlock(lock);
@@ -2212,7 +2212,7 @@ static int enc_txavail(struct net_driver_s *dev)
if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) if ((enc_rdgreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0)
{ {
/* The interface is up and TX is idle; poll uIP for new XMIT data */ /* The interface is up and TX is idle; poll the network for new XMIT data */
(void)devif_poll(&priv->dev, enc_txpoll); (void)devif_poll(&priv->dev, enc_txpoll);
} }
+22 -22
View File
@@ -265,9 +265,9 @@ struct enc_driver_s
FAR struct spi_dev_s *spi; FAR struct spi_dev_s *spi;
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s dev; /* Interface understood by uIP */ struct net_driver_s dev; /* Interface understood by the network */
}; };
/**************************************************************************** /****************************************************************************
@@ -1081,7 +1081,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv)
* *
* Assumptions: * Assumptions:
* A packet is available in d_buf. * A packet is available in d_buf.
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1138,7 +1138,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv)
* Function: enc_txpoll * Function: enc_txpoll
* *
* Description: * Description:
* Enqueues uIP packets if available. * Enqueues network packets if available.
* This is a callback from devif_poll(). devif_poll() may be called: * This is a callback from devif_poll(). devif_poll() may be called:
* *
* 1. When the preceding TX packet send is complete, * 1. When the preceding TX packet send is complete,
@@ -1152,7 +1152,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv)
* OK on success; a negated errno on failure * OK on success; a negated errno on failure
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1273,7 +1273,7 @@ static void enc_linkstatus(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1322,7 +1322,7 @@ static void enc_txif(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1362,7 +1362,7 @@ static void enc_rxldpkt(FAR struct enc_driver_s *priv,
* A free rx descriptor * A free rx descriptor
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1395,7 +1395,7 @@ static struct enc_descr_s *enc_rxgetdescr(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1443,7 +1443,7 @@ static void enc_rxrmpkt(FAR struct enc_driver_s *priv, FAR struct enc_descr_s *d
* Function: enc_rxdispatch * Function: enc_rxdispatch
* *
* Description: * Description:
* Give the newly received packet to uIP. * Give the newly received packet to the network.
* *
* Parameters: * Parameters:
* priv - Reference to the driver state structure * priv - Reference to the driver state structure
@@ -1452,7 +1452,7 @@ static void enc_rxrmpkt(FAR struct enc_driver_s *priv, FAR struct enc_descr_s *d
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1633,7 +1633,7 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1763,7 +1763,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
* None * None
* *
* Assumptions: * Assumptions:
* Interrupts are enabled but the caller holds the uIP lock. * Interrupts are enabled but the caller holds the network lock.
* *
****************************************************************************/ ****************************************************************************/
@@ -1832,7 +1832,7 @@ static void enc_irqworker(FAR void *arg)
DEBUGASSERT(priv); DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */ /* Get exclusive access to both the network and the SPI bus. */
lock = net_lock(); lock = net_lock();
enc_lock(priv); enc_lock(priv);
@@ -1975,7 +1975,7 @@ static void enc_irqworker(FAR void *arg)
enc_bfs(priv, ENC_EIE, EIE_INTIE); enc_bfs(priv, ENC_EIE, EIE_INTIE);
/* Release lock on the SPI bus and uIP */ /* Release lock on the SPI bus and the network */
enc_unlock(priv); enc_unlock(priv);
net_unlock(lock); net_unlock(lock);
@@ -2046,7 +2046,7 @@ static void enc_toworker(FAR void *arg)
nlldbg("Tx timeout\n"); nlldbg("Tx timeout\n");
DEBUGASSERT(priv); DEBUGASSERT(priv);
/* Get exclusive access to uIP. */ /* Get exclusive access to the network. */
lock = net_lock(); lock = net_lock();
@@ -2064,11 +2064,11 @@ static void enc_toworker(FAR void *arg)
DEBUGASSERT(ret == OK); DEBUGASSERT(ret == OK);
(void)ret; (void)ret;
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&priv->dev, enc_txpoll); (void)devif_poll(&priv->dev, enc_txpoll);
/* Release uIP */ /* Release the network */
net_unlock(lock); net_unlock(lock);
} }
@@ -2138,7 +2138,7 @@ static void enc_pollworker(FAR void *arg)
DEBUGASSERT(priv); DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */ /* Get exclusive access to both the network and the SPI bus. */
lock = net_lock(); lock = net_lock();
enc_lock(priv); enc_lock(priv);
@@ -2151,7 +2151,7 @@ static void enc_pollworker(FAR void *arg)
if ((enc_rdreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) if ((enc_rdreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0)
{ {
/* Yes.. update TCP timing states and poll uIP for new XMIT data. Hmmm.. /* Yes.. update TCP timing states and poll the network for new XMIT data. Hmmm..
* looks like a bug here to me. Does this mean if there is a transmit * looks like a bug here to me. Does this mean if there is a transmit
* in progress, we will missing TCP time state updates? * in progress, we will missing TCP time state updates?
*/ */
@@ -2159,7 +2159,7 @@ static void enc_pollworker(FAR void *arg)
(void)devif_timer(&priv->dev, enc_txpoll); (void)devif_timer(&priv->dev, enc_txpoll);
} }
/* Release lock on the SPI bus and uIP */ /* Release lock on the SPI bus and the network */
enc_unlock(priv); enc_unlock(priv);
net_unlock(lock); net_unlock(lock);
@@ -2381,7 +2381,7 @@ static int enc_txavail(struct net_driver_s *dev)
if ((enc_rdreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0) if ((enc_rdreg(priv, ENC_ECON1) & ECON1_TXRTS) == 0)
{ {
/* The interface is up and TX is idle; poll uIP for new XMIT data */ /* The interface is up and TX is idle; poll the network for new XMIT data */
(void)devif_poll(&priv->dev, enc_txpoll); (void)devif_poll(&priv->dev, enc_txpoll);
} }
+7 -7
View File
@@ -171,9 +171,9 @@ struct ftmac100_driver_s
struct work_s ft_work; /* For deferring work to the work queue */ struct work_s ft_work; /* For deferring work to the work queue */
#endif #endif
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s ft_dev; /* Interface understood by uIP */ struct net_driver_s ft_dev; /* Interface understood by the network */
}; };
/**************************************************************************** /****************************************************************************
@@ -331,7 +331,7 @@ static int ftmac100_transmit(FAR struct ftmac100_driver_s *priv)
* Function: ftmac100_txpoll * Function: ftmac100_txpoll
* *
* Description: * Description:
* The transmitter is available, check if uIP has any outgoing packets * The transmitter is available, check if the network has any outgoing packets
* ready to send. This is a callback from devif_poll(). devif_poll() may * ready to send. This is a callback from devif_poll(). devif_poll() may
* be called: * be called:
* *
@@ -849,7 +849,7 @@ static void ftmac100_txdone(FAR struct ftmac100_driver_s *priv)
(void)wd_start(priv->ft_txpoll, FTMAC100_WDDELAY, ftmac100_poll_expiry, 1, (void)wd_start(priv->ft_txpoll, FTMAC100_WDDELAY, ftmac100_poll_expiry, 1,
(wdparm_t)priv); (wdparm_t)priv);
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&priv->ft_dev, ftmac100_txpoll); (void)devif_poll(&priv->ft_dev, ftmac100_txpoll);
} }
@@ -1089,7 +1089,7 @@ static inline void ftmac100_txtimeout_process(FAR struct ftmac100_driver_s *priv
nvdbg("TXTIMEOUT\n"); nvdbg("TXTIMEOUT\n");
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
(void)devif_poll(&priv->ft_dev, ftmac100_txpoll); (void)devif_poll(&priv->ft_dev, ftmac100_txpoll);
} }
@@ -1195,7 +1195,7 @@ static inline void ftmac100_poll_process(FAR struct ftmac100_driver_s *priv)
* the TX poll if he are unable to accept another packet for transmission. * the TX poll if he are unable to accept another packet for transmission.
*/ */
/* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. /* If so, update TCP timing states and poll the network for new XMIT data. Hmmm..
* might be bug here. Does this mean if there is a transmit in progress, * might be bug here. Does this mean if there is a transmit in progress,
* we will missing TCP time state updates? * we will missing TCP time state updates?
*/ */
@@ -1421,7 +1421,7 @@ static inline void ftmac100_txavail_process(FAR struct ftmac100_driver_s *priv)
{ {
/* Check if there is room in the hardware to hold another outgoing packet. */ /* Check if there is room in the hardware to hold another outgoing packet. */
/* If so, then poll uIP for new XMIT data */ /* If so, then poll the network for new XMIT data */
(void)devif_poll(&priv->ft_dev, ftmac100_txpoll); (void)devif_poll(&priv->ft_dev, ftmac100_txpoll);
} }
+2 -2
View File
@@ -99,9 +99,9 @@ struct lo_driver_s
WDOG_ID lo_polldog; /* TX poll timer */ WDOG_ID lo_polldog; /* TX poll timer */
struct work_s lo_work; /* For deferring work to the work queue */ struct work_s lo_work; /* For deferring work to the work queue */
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s lo_dev; /* Interface understood by uIP */ struct net_driver_s lo_dev; /* Interface understood by the network */
}; };
/**************************************************************************** /****************************************************************************
+6 -6
View File
@@ -146,11 +146,11 @@ struct slip_driver_s
uint16_t rxlen; /* The number of bytes in rxbuf */ uint16_t rxlen; /* The number of bytes in rxbuf */
pid_t rxpid; /* Receiver thread ID */ pid_t rxpid; /* Receiver thread ID */
pid_t txpid; /* Transmitter thread ID */ pid_t txpid; /* Transmitter thread ID */
sem_t waitsem; /* Mutually exclusive access to uIP */ sem_t waitsem; /* Mutually exclusive access to the network */
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s dev; /* Interface understood by uIP */ struct net_driver_s dev; /* Interface understood by the network */
uint8_t rxbuf[CONFIG_NET_SLIP_MTU + 2]; uint8_t rxbuf[CONFIG_NET_SLIP_MTU + 2];
uint8_t txbuf[CONFIG_NET_SLIP_MTU + 2]; uint8_t txbuf[CONFIG_NET_SLIP_MTU + 2];
}; };
@@ -378,7 +378,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv)
* Function: slip_txpoll * Function: slip_txpoll
* *
* Description: * Description:
* Check if uIP has any outgoing packets ready to send. This is a * Check if the network has any outgoing packets ready to send. This is a
* callback from devif_poll(). devif_poll() may be called: * callback from devif_poll(). devif_poll() may be called:
* *
* 1. When the preceding TX packet send is complete, or * 1. When the preceding TX packet send is complete, or
@@ -471,7 +471,7 @@ static void slip_txtask(int argc, FAR char *argv[])
if (priv->bifup) if (priv->bifup)
{ {
/* Get exclusive access to uIP (if it it is already being used /* Get exclusive access to the network (if it it is already being used
* slip_rxtask, then we have to wait). * slip_rxtask, then we have to wait).
*/ */
@@ -725,7 +725,7 @@ static int slip_rxtask(int argc, FAR char *argv[])
{ {
NETDEV_RXIPV4(&priv->dev); NETDEV_RXIPV4(&priv->dev);
/* Handle the IP input. Get exclusive access to uIP. */ /* Handle the IP input. Get exclusive access to the network. */
slip_semtake(priv); slip_semtake(priv);
priv->dev.d_buf = priv->rxbuf; priv->dev.d_buf = priv->rxbuf;
+6 -6
View File
@@ -129,9 +129,9 @@ struct tun_device_s
sem_t waitsem; sem_t waitsem;
sem_t read_wait_sem; sem_t read_wait_sem;
/* This holds the information visible to uIP/NuttX */ /* This holds the information visible to the NuttX network */
struct net_driver_s dev; /* Interface understood by uIP */ struct net_driver_s dev; /* Interface understood by the network */
}; };
struct tun_driver_s struct tun_driver_s
@@ -345,7 +345,7 @@ static int tun_transmit(FAR struct tun_device_s *priv)
* Function: tun_txpoll * Function: tun_txpoll
* *
* Description: * Description:
* The transmitter is available, check if uIP has any outgoing packets * The transmitter is available, check if the network has any outgoing packets
* ready to send. This is a callback from devif_poll(). devif_poll() may * ready to send. This is a callback from devif_poll(). devif_poll() may
* be called: * be called:
* *
@@ -498,7 +498,7 @@ static void tun_txdone(FAR struct tun_device_s *priv)
NETDEV_TXDONE(&priv->dev); NETDEV_TXDONE(&priv->dev);
/* Then poll uIP for new XMIT data */ /* Then poll the network for new XMIT data */
priv->dev.d_buf = priv->read_buf; priv->dev.d_buf = priv->read_buf;
(void)devif_poll(&priv->dev, tun_txpoll); (void)devif_poll(&priv->dev, tun_txpoll);
@@ -529,7 +529,7 @@ static void tun_poll_process(FAR struct tun_device_s *priv)
if (priv->read_d_len == 0) if (priv->read_d_len == 0)
{ {
/* If so, poll uIP for new XMIT data. */ /* If so, poll the network for new XMIT data. */
priv->dev.d_buf = priv->read_buf; priv->dev.d_buf = priv->read_buf;
(void)devif_timer(&priv->dev, tun_txpoll); (void)devif_timer(&priv->dev, tun_txpoll);
@@ -746,7 +746,7 @@ static int tun_txavail(struct net_driver_s *dev)
if (priv->bifup) if (priv->bifup)
{ {
/* Poll uIP for new XMIT data */ /* Poll the network for new XMIT data */
priv->dev.d_buf = priv->read_buf; priv->dev.d_buf = priv->read_buf;
(void)devif_poll(&priv->dev, tun_txpoll); (void)devif_poll(&priv->dev, tun_txpoll);