mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
Replace confusing references to uIP with just 'the network'
This commit is contained in:
@@ -599,6 +599,12 @@ o Kernel/Protected Build
|
||||
For a truly secure system. Privileges need to be checked in
|
||||
every interface that permits one thread to modify the
|
||||
properties of another thread.
|
||||
|
||||
NOTE: It would be a simple matter to simply disable user
|
||||
threads from modifying privileged threads. However, you
|
||||
might also want to be able to modify privileged threads from
|
||||
user tasks with certain permissions. Permissions is a much
|
||||
more complex issue.
|
||||
Status: Open
|
||||
Priority: Low for most embedded systems but would be a critical need if
|
||||
NuttX were used in a secure system.
|
||||
|
||||
@@ -331,9 +331,9 @@ struct c5471_driver_s
|
||||
uint32_t c_rxdropped; /* Packets dropped because of size */
|
||||
#endif
|
||||
|
||||
/* This holds the information visible to uIP/NuttX */
|
||||
/* This holds the information visible to the NuttX network */
|
||||
|
||||
struct net_driver_s c_dev; /* Interface understood by uIP */
|
||||
struct net_driver_s c_dev; /* Interface understood by the network */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@@ -960,7 +960,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471)
|
||||
* Function: c5471_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -1162,7 +1162,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
|
||||
int j = 0;
|
||||
|
||||
/* Walk the newly received packet contained within the EIM and transfer
|
||||
* its contents to the uIP buffer. This frees up the memory contained within
|
||||
* its contents to the network buffer. This frees up the memory contained within
|
||||
* the EIM for additional packets that might be received later from the network.
|
||||
*/
|
||||
|
||||
@@ -1185,7 +1185,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
|
||||
framelen = (getreg32(c5471->c_txcpudesc) & EIM_TXDESC_BYTEMASK);
|
||||
packetlen += framelen;
|
||||
|
||||
/* Check if the received packet will fit within the uIP packet buffer */
|
||||
/* Check if the received packet will fit within the network packet buffer */
|
||||
|
||||
if (packetlen < (CONFIG_NET_ETH_MTU + 4))
|
||||
{
|
||||
@@ -1234,7 +1234,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
|
||||
c5471_inctxcpu(c5471);
|
||||
}
|
||||
|
||||
/* Adjust the packet length to remove the CRC bytes that uIP doesn't care about. */
|
||||
/* Adjust the packet length to remove the CRC bytes that the network doesn't care about. */
|
||||
|
||||
packetlen -= 4;
|
||||
|
||||
@@ -1244,8 +1244,8 @@ static void c5471_receive(struct c5471_driver_s *c5471)
|
||||
c5471->c_rxpackets++;
|
||||
#endif
|
||||
|
||||
/* If we successfully transferred the data into the uIP buffer, then pass it on
|
||||
* to uIP for processing.
|
||||
/* If we successfully transferred the data into the network buffer, then pass it on
|
||||
* to the network for processing.
|
||||
*/
|
||||
|
||||
if (packetlen > 0 && packetlen < CONFIG_NET_ETH_MTU)
|
||||
@@ -1496,7 +1496,7 @@ static void c5471_txdone(struct c5471_driver_s *c5471)
|
||||
|
||||
wd_cancel(c5471->c_txtimeout);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&c5471->c_dev, c5471_txpoll);
|
||||
}
|
||||
@@ -1615,7 +1615,7 @@ static void c5471_txtimeout(int argc, uint32_t arg, ...)
|
||||
c5471_ifdown(&c5471->c_dev);
|
||||
c5471_ifup(&c5471->c_dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&c5471->c_dev, c5471_txpoll);
|
||||
}
|
||||
@@ -1647,7 +1647,7 @@ static void c5471_polltimer(int argc, uint32_t arg, ...)
|
||||
|
||||
if ((EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0)
|
||||
{
|
||||
/* 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(&c5471->c_dev, c5471_txpoll);
|
||||
}
|
||||
@@ -1811,7 +1811,7 @@ static int c5471_txavail(struct net_driver_s *dev)
|
||||
|
||||
if ((EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0)
|
||||
{
|
||||
/* If so, then poll uIP for new XMIT data */
|
||||
/* If so, then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&c5471->c_dev, c5471_txpoll);
|
||||
}
|
||||
|
||||
@@ -150,3 +150,7 @@ CHIP_CSRCS += imx_serial.c imx_lowputc.c
|
||||
ifeq ($(CONFIG_SMP),y)
|
||||
CHIP_CSRCS += imx_cpuboot.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_IMX6_ECSPI),y)
|
||||
CHIP_CSRCS += imx_ecspi.c
|
||||
endif
|
||||
|
||||
@@ -165,9 +165,9 @@ struct kinetis_driver_s
|
||||
struct enet_desc_s *txdesc; /* A pointer to the list of TX descriptor */
|
||||
struct enet_desc_s *rxdesc; /* A pointer to the list of RX descriptors */
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* The DMA descriptors. A unaligned uint8_t is used to allocate the
|
||||
* memory; 16 is added to assure that we can meet the descriptor alignment
|
||||
@@ -435,7 +435,7 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv)
|
||||
* Function: kinetis_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -731,7 +731,7 @@ static void kinetis_txdone(FAR struct kinetis_driver_s *priv)
|
||||
putreg32(regval, KINETIS_ENET_EIMR);
|
||||
}
|
||||
|
||||
/* There should be space for a new TX in any event. Poll uIP for new XMIT
|
||||
/* There should be space for a new TX in any event. Poll the network for new XMIT
|
||||
* data
|
||||
*/
|
||||
|
||||
@@ -848,7 +848,7 @@ static void kinetis_txtimeout(int argc, uint32_t arg, ...)
|
||||
(void)kinetis_ifdown(&priv->dev);
|
||||
(void)kinetis_ifup(&priv->dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&priv->dev, kinetis_txpoll);
|
||||
}
|
||||
@@ -881,7 +881,7 @@ static void kinetis_polltimer(int argc, uint32_t arg, ...)
|
||||
|
||||
if (!kinetics_txringfull(priv))
|
||||
{
|
||||
/* 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,
|
||||
* we will missing TCP time state updates?
|
||||
*/
|
||||
@@ -1112,7 +1112,7 @@ static int kinetis_txavail(struct net_driver_s *dev)
|
||||
|
||||
if (!kinetics_txringfull(priv))
|
||||
{
|
||||
/* No, there is space for another transfer. Poll uIP for new
|
||||
/* No, there is space for another transfer. Poll the network for new
|
||||
* XMIT data.
|
||||
*/
|
||||
|
||||
|
||||
@@ -522,9 +522,9 @@ struct lpc43_ethmac_s
|
||||
struct work_s work; /* For deferring work to the work queue */
|
||||
#endif
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Used to track transmit and receive descriptors */
|
||||
|
||||
@@ -928,7 +928,7 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv)
|
||||
struct eth_txdesc_s *txdesc;
|
||||
struct eth_txdesc_s *txfirst;
|
||||
|
||||
/* The internal (optimal) uIP buffer size may be configured to be larger
|
||||
/* The internal (optimal) network buffer size may be configured to be larger
|
||||
* than the Ethernet buffer size.
|
||||
*/
|
||||
|
||||
@@ -1114,7 +1114,7 @@ static int lpc43_transmit(FAR struct lpc43_ethmac_s *priv)
|
||||
* Function: lpc43_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -1520,7 +1520,7 @@ static int lpc43_recvframe(FAR struct lpc43_ethmac_s *priv)
|
||||
buffer = lpc43_allocbuffer(priv);
|
||||
|
||||
/* Take the buffer from the RX descriptor of the first free
|
||||
* segment, put it into the uIP device structure, then replace
|
||||
* segment, put it into the network device structure, then replace
|
||||
* the buffer in the RX descriptor with the newly allocated
|
||||
* buffer.
|
||||
*/
|
||||
@@ -1602,7 +1602,7 @@ static void lpc43_receive(FAR struct lpc43_ethmac_s *priv)
|
||||
pkt_input(&priv->dev);
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -1888,7 +1888,7 @@ static void lpc43_txdone(FAR struct lpc43_ethmac_s *priv)
|
||||
lpc43_disableint(priv, ETH_DMAINT_TI);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
lpc43_dopoll(priv);
|
||||
}
|
||||
@@ -2120,7 +2120,7 @@ static inline void lpc43_txtimeout_process(FAR struct lpc43_ethmac_s *priv)
|
||||
lpc43_ifdown(&priv->dev);
|
||||
lpc43_ifup(&priv->dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
lpc43_dopoll(priv);
|
||||
}
|
||||
|
||||
@@ -278,9 +278,9 @@ struct sam_emac_s
|
||||
struct work_s work; /* For deferring work to the work queue */
|
||||
#endif
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Used to track transmit and receive descriptors */
|
||||
|
||||
@@ -841,7 +841,7 @@ static int sam_transmit(struct sam_emac_s *priv)
|
||||
* Function: sam_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -951,7 +951,7 @@ static void sam_dopoll(struct sam_emac_s *priv)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* If we have the descriptor, then poll uIP for new XMIT data. */
|
||||
/* If we have the descriptor, then poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_poll(dev, sam_txpoll);
|
||||
}
|
||||
@@ -1201,7 +1201,7 @@ static void sam_receive(struct sam_emac_s *priv)
|
||||
{
|
||||
sam_dumppacket("Received packet", dev->d_buf, dev->d_len);
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -1403,7 +1403,7 @@ static void sam_txdone(struct sam_emac_s *priv)
|
||||
sam_putreg(priv, SAM_EMAC_IER, EMAC_INT_RCOMP);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -1734,7 +1734,7 @@ static inline void sam_txtimeout_process(FAR struct sam_emac_s *priv)
|
||||
sam_ifdown(&priv->dev);
|
||||
sam_ifup(&priv->dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -1844,7 +1844,7 @@ static inline void sam_poll_process(FAR struct sam_emac_s *priv)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* Update TCP timing states and poll uIP for new XMIT data. */
|
||||
/* Update TCP timing states and poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_timer(dev, sam_txpoll);
|
||||
}
|
||||
@@ -2083,7 +2083,7 @@ static inline void sam_txavail_process(FAR struct sam_emac_s *priv)
|
||||
|
||||
if (priv->ifup)
|
||||
{
|
||||
/* Poll uIP for new XMIT data */
|
||||
/* Poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
|
||||
@@ -267,9 +267,9 @@ struct sam_emac_s
|
||||
WDOG_ID txpoll; /* TX poll 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 dev; /* Interface understood by uIP */
|
||||
struct net_driver_s dev; /* Interface understood by the network */
|
||||
|
||||
/* Used to track transmit and receive descriptors */
|
||||
|
||||
@@ -817,7 +817,7 @@ static int sam_transmit(struct sam_emac_s *priv)
|
||||
* Function: sam_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -926,7 +926,7 @@ static void sam_dopoll(struct sam_emac_s *priv)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* If we have the descriptor, then poll uIP for new XMIT data. */
|
||||
/* If we have the descriptor, then poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_poll(dev, sam_txpoll);
|
||||
}
|
||||
@@ -1206,7 +1206,7 @@ static void sam_receive(struct sam_emac_s *priv)
|
||||
{
|
||||
sam_dumppacket("Received packet", dev->d_buf, dev->d_len);
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -1410,7 +1410,7 @@ static void sam_txdone(struct sam_emac_s *priv)
|
||||
sam_putreg(priv, SAM_EMAC_IER, EMAC_INT_RCOMP);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -1633,7 +1633,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...)
|
||||
sam_ifdown(&priv->dev);
|
||||
sam_ifup(&priv->dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -1667,7 +1667,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* Update TCP timing states and poll uIP for new XMIT data. */
|
||||
/* Update TCP timing states and poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_timer(dev, sam_txpoll);
|
||||
}
|
||||
@@ -1837,7 +1837,7 @@ static int sam_txavail(struct net_driver_s *dev)
|
||||
|
||||
if (priv->ifup)
|
||||
{
|
||||
/* Poll uIP for new XMIT data */
|
||||
/* Poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
|
||||
@@ -421,9 +421,9 @@ struct sam_emac_s
|
||||
struct work_s work; /* For deferring work to the work queue */
|
||||
#endif
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Constant and configured attributes of the EMAC */
|
||||
|
||||
@@ -1180,7 +1180,7 @@ static int sam_transmit(struct sam_emac_s *priv)
|
||||
* Function: sam_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -1290,7 +1290,7 @@ static void sam_dopoll(struct sam_emac_s *priv)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* If we have the descriptor, then poll uIP for new XMIT data. */
|
||||
/* If we have the descriptor, then poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_poll(dev, sam_txpoll);
|
||||
}
|
||||
@@ -1569,7 +1569,7 @@ static void sam_receive(struct sam_emac_s *priv)
|
||||
{
|
||||
sam_dumppacket("Received packet", dev->d_buf, dev->d_len);
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -1797,7 +1797,7 @@ static void sam_txdone(struct sam_emac_s *priv)
|
||||
sam_putreg(priv, SAM_EMAC_IER_OFFSET, EMAC_INT_RCOMP);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -2154,7 +2154,7 @@ static inline void sam_txtimeout_process(FAR struct sam_emac_s *priv)
|
||||
sam_ifdown(&priv->dev);
|
||||
sam_ifup(&priv->dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -2264,7 +2264,7 @@ static inline void sam_poll_process(FAR struct sam_emac_s *priv)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* Update TCP timing states and poll uIP for new XMIT data. */
|
||||
/* Update TCP timing states and poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_timer(dev, sam_txpoll);
|
||||
}
|
||||
@@ -2511,7 +2511,7 @@ static inline void sam_txavail_process(FAR struct sam_emac_s *priv)
|
||||
|
||||
if (priv->ifup)
|
||||
{
|
||||
/* Poll uIP for new XMIT data */
|
||||
/* Poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
|
||||
@@ -193,9 +193,9 @@ struct sam_gmac_s
|
||||
WDOG_ID txpoll; /* TX poll 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 dev; /* Interface understood by uIP */
|
||||
struct net_driver_s dev; /* Interface understood by the network */
|
||||
|
||||
/* Used to track transmit and receive descriptors */
|
||||
|
||||
@@ -749,7 +749,7 @@ static int sam_transmit(struct sam_gmac_s *priv)
|
||||
* Function: sam_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -858,7 +858,7 @@ static void sam_dopoll(struct sam_gmac_s *priv)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* If we have the descriptor, then poll uIP for new XMIT data. */
|
||||
/* If we have the descriptor, then poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_poll(dev, sam_txpoll);
|
||||
}
|
||||
@@ -1136,7 +1136,7 @@ static void sam_receive(struct sam_gmac_s *priv)
|
||||
{
|
||||
sam_dumppacket("Received packet", dev->d_buf, dev->d_len);
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -1338,7 +1338,7 @@ static void sam_txdone(struct sam_gmac_s *priv)
|
||||
sam_putreg(priv, SAM_GMAC_IER, GMAC_INT_RCOMP);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -1585,7 +1585,7 @@ static void sam_txtimeout(int argc, uint32_t arg, ...)
|
||||
sam_ifdown(&priv->dev);
|
||||
sam_ifup(&priv->dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
@@ -1619,7 +1619,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...)
|
||||
|
||||
if (sam_txfree(priv) > 0)
|
||||
{
|
||||
/* Update TCP timing states and poll uIP for new XMIT data. */
|
||||
/* Update TCP timing states and poll the network for new XMIT data. */
|
||||
|
||||
(void)devif_timer(dev, sam_txpoll);
|
||||
}
|
||||
@@ -1792,7 +1792,7 @@ static int sam_txavail(struct net_driver_s *dev)
|
||||
|
||||
if (priv->ifup)
|
||||
{
|
||||
/* Poll uIP for new XMIT data */
|
||||
/* Poll the network for new XMIT data */
|
||||
|
||||
sam_dopoll(priv);
|
||||
}
|
||||
|
||||
@@ -585,9 +585,9 @@ struct stm32_ethmac_s
|
||||
struct work_s work; /* For deferring work to the work queue */
|
||||
#endif
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Used to track transmit and receive descriptors */
|
||||
|
||||
@@ -993,7 +993,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv)
|
||||
struct eth_txdesc_s *txdesc;
|
||||
struct eth_txdesc_s *txfirst;
|
||||
|
||||
/* The internal (optimal) uIP buffer size may be configured to be larger
|
||||
/* The internal (optimal) network buffer size may be configured to be larger
|
||||
* than the Ethernet buffer size.
|
||||
*/
|
||||
|
||||
@@ -1179,7 +1179,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv)
|
||||
* Function: stm32_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -1321,7 +1321,7 @@ static void stm32_dopoll(FAR struct stm32_ethmac_s *priv)
|
||||
if ((priv->txhead->tdes0 & ETH_TDES0_OWN) == 0 &&
|
||||
priv->txhead->tdes2 == 0)
|
||||
{
|
||||
/* If we have the descriptor, then poll uIP for new XMIT data.
|
||||
/* If we have the descriptor, then poll the network for new XMIT data.
|
||||
* Allocate a buffer for the poll.
|
||||
*/
|
||||
|
||||
@@ -1585,7 +1585,7 @@ static int stm32_recvframe(FAR struct stm32_ethmac_s *priv)
|
||||
buffer = stm32_allocbuffer(priv);
|
||||
|
||||
/* Take the buffer from the RX descriptor of the first free
|
||||
* segment, put it into the uIP device structure, then replace
|
||||
* segment, put it into the network device structure, then replace
|
||||
* the buffer in the RX descriptor with the newly allocated
|
||||
* buffer.
|
||||
*/
|
||||
@@ -1667,7 +1667,7 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv)
|
||||
pkt_input(&priv->dev);
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -1955,7 +1955,7 @@ static void stm32_txdone(FAR struct stm32_ethmac_s *priv)
|
||||
stm32_disableint(priv, ETH_DMAINT_TI);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
stm32_dopoll(priv);
|
||||
}
|
||||
@@ -2321,7 +2321,7 @@ static inline void stm32_poll_process(FAR struct stm32_ethmac_s *priv)
|
||||
|
||||
if (dev->d_buf)
|
||||
{
|
||||
/* Update TCP timing states and poll uIP for new XMIT data.
|
||||
/* Update TCP timing states and poll the network for new XMIT data.
|
||||
*/
|
||||
|
||||
(void)devif_timer(dev, stm32_txpoll);
|
||||
@@ -2551,7 +2551,7 @@ static inline void stm32_txavail_process(FAR struct stm32_ethmac_s *priv)
|
||||
|
||||
if (priv->ifup)
|
||||
{
|
||||
/* Poll uIP for new XMIT data */
|
||||
/* Poll the network for new XMIT data */
|
||||
|
||||
stm32_dopoll(priv);
|
||||
}
|
||||
|
||||
@@ -609,9 +609,9 @@ struct stm32_ethmac_s
|
||||
struct work_s work; /* For deferring work to the work queue */
|
||||
#endif
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* Used to track transmit and receive descriptors */
|
||||
|
||||
@@ -1041,7 +1041,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv)
|
||||
struct eth_txdesc_s *txdesc;
|
||||
struct eth_txdesc_s *txfirst;
|
||||
|
||||
/* The internal (optimal) uIP buffer size may be configured to be larger
|
||||
/* The internal (optimal) network buffer size may be configured to be larger
|
||||
* than the Ethernet buffer size.
|
||||
*/
|
||||
|
||||
@@ -1249,7 +1249,7 @@ static int stm32_transmit(struct stm32_ethmac_s *priv)
|
||||
* Function: stm32_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -1391,7 +1391,7 @@ static void stm32_dopoll(struct stm32_ethmac_s *priv)
|
||||
if ((priv->txhead->tdes0 & ETH_TDES0_OWN) == 0 &&
|
||||
priv->txhead->tdes2 == 0)
|
||||
{
|
||||
/* If we have the descriptor, then poll uIP for new XMIT data.
|
||||
/* If we have the descriptor, then poll the network for new XMIT data.
|
||||
* Allocate a buffer for the poll.
|
||||
*/
|
||||
|
||||
@@ -1675,7 +1675,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv)
|
||||
buffer = stm32_allocbuffer(priv);
|
||||
|
||||
/* Take the buffer from the RX descriptor of the first free
|
||||
* segment, put it into the uIP device structure, then replace
|
||||
* segment, put it into the network device structure, then replace
|
||||
* the buffer in the RX descriptor with the newly allocated
|
||||
* buffer.
|
||||
*/
|
||||
@@ -1778,7 +1778,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
|
||||
pkt_input(&priv->dev);
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -2072,7 +2072,7 @@ static void stm32_txdone(struct stm32_ethmac_s *priv)
|
||||
stm32_disableint(priv, ETH_DMAINT_TI);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
stm32_dopoll(priv);
|
||||
}
|
||||
@@ -2437,7 +2437,7 @@ static inline void stm32_poll_process(struct stm32_ethmac_s *priv)
|
||||
|
||||
if (dev->d_buf)
|
||||
{
|
||||
/* Update TCP timing states and poll uIP for new XMIT data.
|
||||
/* Update TCP timing states and poll the network for new XMIT data.
|
||||
*/
|
||||
|
||||
(void)devif_timer(dev, stm32_txpoll);
|
||||
@@ -2667,7 +2667,7 @@ static inline void stm32_txavail_process(struct stm32_ethmac_s *priv)
|
||||
|
||||
if (priv->ifup)
|
||||
{
|
||||
/* Poll uIP for new XMIT data */
|
||||
/* Poll the network for new XMIT data */
|
||||
|
||||
stm32_dopoll(priv);
|
||||
}
|
||||
|
||||
@@ -187,9 +187,9 @@ struct tiva_driver_s
|
||||
WDOG_ID ld_txpoll; /* TX poll timer */
|
||||
WDOG_ID ld_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 ld_dev; /* Interface understood by uIP */
|
||||
struct net_driver_s ld_dev; /* Interface understood by the network */
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
@@ -558,7 +558,7 @@ static int tiva_transmit(struct tiva_driver_s *priv)
|
||||
* Function: tiva_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -677,7 +677,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
|
||||
/* Check if the pktlen is valid. It should be large enough to hold
|
||||
* an Ethernet header and small enough to fit entirely in the I/O
|
||||
* buffer. Six is subtracted to acount for the 2-byte length/type
|
||||
* and 4 byte FCS that are not copied into the uIP packet.
|
||||
* and 4 byte FCS that are not copied into the network packet.
|
||||
*/
|
||||
|
||||
if (pktlen > (CONFIG_NET_ETH_MTU + 6) || pktlen <= (ETH_HDRLEN + 6))
|
||||
@@ -752,7 +752,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
|
||||
}
|
||||
}
|
||||
|
||||
/* Pass the packet length to uIP MINUS 2 bytes for the length and
|
||||
/* Pass the packet length to the network MINUS 2 bytes for the length and
|
||||
* 4 bytes for the FCS.
|
||||
*/
|
||||
|
||||
@@ -905,7 +905,7 @@ static void tiva_txdone(struct tiva_driver_s *priv)
|
||||
|
||||
DEBUGASSERT((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&priv->ld_dev, tiva_txpoll);
|
||||
}
|
||||
@@ -1033,7 +1033,7 @@ static void tiva_txtimeout(int argc, uint32_t arg, ...)
|
||||
tiva_ifdown(&priv->ld_dev);
|
||||
tiva_ifup(&priv->ld_dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
(void)devif_poll(&priv->ld_dev, tiva_txpoll);
|
||||
}
|
||||
@@ -1069,7 +1069,7 @@ static void tiva_polltimer(int argc, uint32_t arg, ...)
|
||||
|
||||
if ((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0)
|
||||
{
|
||||
/* 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(&priv->ld_dev, tiva_txpoll);
|
||||
|
||||
@@ -1353,7 +1353,7 @@ static int tiva_txavail(struct net_driver_s *dev)
|
||||
flags = enter_critical_section();
|
||||
if (priv->ld_bifup && (tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0)
|
||||
{
|
||||
/* If the interface is up and we can use the Tx FIFO, then poll uIP
|
||||
/* If the interface is up and we can use the Tx FIFO, then poll the network
|
||||
* for new Tx data
|
||||
*/
|
||||
|
||||
|
||||
@@ -630,7 +630,7 @@ struct tiva_ethmac_s
|
||||
xcpt_t handler; /* Attached PHY interrupt handler */
|
||||
#endif
|
||||
|
||||
/* 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 network subsystem */
|
||||
|
||||
@@ -1032,7 +1032,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv)
|
||||
struct emac_txdesc_s *txdesc;
|
||||
struct emac_txdesc_s *txfirst;
|
||||
|
||||
/* The internal (optimal) uIP buffer size may be configured to be larger
|
||||
/* The internal (optimal) network buffer size may be configured to be larger
|
||||
* than the Ethernet buffer size.
|
||||
*/
|
||||
|
||||
@@ -1218,7 +1218,7 @@ static int tiva_transmit(FAR struct tiva_ethmac_s *priv)
|
||||
* Function: tiva_txpoll
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 1. When the preceding TX packet send is complete,
|
||||
@@ -1360,7 +1360,7 @@ static void tiva_dopoll(FAR struct tiva_ethmac_s *priv)
|
||||
if ((priv->txhead->tdes0 & EMAC_TDES0_OWN) == 0 &&
|
||||
priv->txhead->tdes2 == 0)
|
||||
{
|
||||
/* If we have the descriptor, then poll uIP for new XMIT data.
|
||||
/* If we have the descriptor, then poll the network for new XMIT data.
|
||||
* Allocate a buffer for the poll.
|
||||
*/
|
||||
|
||||
@@ -1624,7 +1624,7 @@ static int tiva_recvframe(FAR struct tiva_ethmac_s *priv)
|
||||
buffer = tiva_allocbuffer(priv);
|
||||
|
||||
/* Take the buffer from the RX descriptor of the first free
|
||||
* segment, put it into the uIP device structure, then replace
|
||||
* segment, put it into the network device structure, then replace
|
||||
* the buffer in the RX descriptor with the newly allocated
|
||||
* buffer.
|
||||
*/
|
||||
@@ -1706,7 +1706,7 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv)
|
||||
pkt_input(&priv->dev);
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
* (this should not happen)
|
||||
*/
|
||||
|
||||
@@ -1980,7 +1980,7 @@ static void tiva_txdone(FAR struct tiva_ethmac_s *priv)
|
||||
tiva_disableint(priv, EMAC_DMAINT_TI);
|
||||
}
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
tiva_dopoll(priv);
|
||||
}
|
||||
@@ -2228,7 +2228,7 @@ static inline void tiva_txtimeout_process(FAR struct tiva_ethmac_s *priv)
|
||||
tiva_ifdown(&priv->dev);
|
||||
tiva_ifup(&priv->dev);
|
||||
|
||||
/* Then poll uIP for new XMIT data */
|
||||
/* Then poll the network for new XMIT data */
|
||||
|
||||
tiva_dopoll(priv);
|
||||
}
|
||||
@@ -2362,7 +2362,7 @@ static inline void tiva_poll_process(FAR struct tiva_ethmac_s *priv)
|
||||
|
||||
if (dev->d_buf)
|
||||
{
|
||||
/* Update TCP timing states and poll uIP for new XMIT data.
|
||||
/* Update TCP timing states and poll the network for new XMIT data.
|
||||
*/
|
||||
|
||||
(void)devif_timer(dev, tiva_txpoll);
|
||||
@@ -2592,7 +2592,7 @@ static inline void tiva_txavail_process(FAR struct tiva_ethmac_s *priv)
|
||||
|
||||
if (priv->ifup)
|
||||
{
|
||||
/* Poll uIP for new XMIT data */
|
||||
/* Poll the network for new XMIT data */
|
||||
|
||||
tiva_dopoll(priv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user