From b0c1b7ef470ba48dcc54a234e7eeeee264b46cd1 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 30 Jun 2014 18:40:41 -0600 Subject: [PATCH] Rename uip_poll->devif_poll and uip_timer->devif_timer --- arch/arm/src/c5471/c5471_ethernet.c | 10 ++++----- arch/arm/src/kinetis/kinetis_enet.c | 10 ++++----- arch/arm/src/lpc17xx/lpc17_ethernet.c | 10 ++++----- arch/arm/src/sam34/sam_emac.c | 6 +++--- arch/arm/src/sama5/sam_emaca.c | 6 +++--- arch/arm/src/sama5/sam_emacb.c | 6 +++--- arch/arm/src/sama5/sam_gmac.c | 6 +++--- arch/arm/src/stm32/stm32_eth.c | 6 +++--- arch/arm/src/tiva/tiva_ethernet.c | 10 ++++----- arch/hc/src/m9s12/m9s12_ethernet.c | 10 ++++----- arch/mips/src/pic32mx/pic32mx-ethernet.c | 6 +++--- arch/sim/src/up_uipdriver.c | 2 +- arch/z80/src/ez80/ez80_emac.c | 8 ++++---- drivers/net/cs89x0.c | 10 ++++----- drivers/net/dm90x0.c | 10 ++++----- drivers/net/e1000.c | 10 ++++----- drivers/net/enc28j60.c | 10 ++++----- drivers/net/encx24j600.c | 10 ++++----- drivers/net/skeleton.c | 10 ++++----- drivers/net/slip.c | 4 ++-- drivers/net/vnet.c | 10 ++++----- include/nuttx/net/netdev.h | 21 ++++++++++--------- net/devif/devif_poll.c | 26 ++++++++++++------------ 23 files changed, 109 insertions(+), 108 deletions(-) diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c index 36efd78f98..cd29b20611 100644 --- a/arch/arm/src/c5471/c5471_ethernet.c +++ b/arch/arm/src/c5471/c5471_ethernet.c @@ -958,7 +958,7 @@ static int c5471_transmit(struct c5471_driver_s *c5471) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1403,7 +1403,7 @@ static void c5471_txdone(struct c5471_driver_s *c5471) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&c5471->c_dev, c5471_uiptxpoll); + (void)devif_poll(&c5471->c_dev, c5471_uiptxpoll); } /**************************************************************************** @@ -1522,7 +1522,7 @@ static void c5471_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&c5471->c_dev, c5471_uiptxpoll); + (void)devif_poll(&c5471->c_dev, c5471_uiptxpoll); } /**************************************************************************** @@ -1554,7 +1554,7 @@ static void c5471_polltimer(int argc, uint32_t arg, ...) { /* If so, update TCP timing states and poll uIP for new XMIT data */ - (void)uip_timer(&c5471->c_dev, c5471_uiptxpoll, C5471_POLLHSEC); + (void)devif_timer(&c5471->c_dev, c5471_uiptxpoll, C5471_POLLHSEC); } /* Setup the watchdog poll timer again */ @@ -1715,7 +1715,7 @@ static int c5471_txavail(struct net_driver_s *dev) { /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&c5471->c_dev, c5471_uiptxpoll); + (void)devif_poll(&c5471->c_dev, c5471_uiptxpoll); } } diff --git a/arch/arm/src/kinetis/kinetis_enet.c b/arch/arm/src/kinetis/kinetis_enet.c index 7b243d0416..52a6d65278 100644 --- a/arch/arm/src/kinetis/kinetis_enet.c +++ b/arch/arm/src/kinetis/kinetis_enet.c @@ -415,7 +415,7 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -609,7 +609,7 @@ static void kinetis_txdone(FAR struct kinetis_driver_s *priv) * data */ - (void)uip_poll(&priv->dev, kinetis_uiptxpoll); + (void)devif_poll(&priv->dev, kinetis_uiptxpoll); } /**************************************************************************** @@ -722,7 +722,7 @@ static void kinetis_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, kinetis_uiptxpoll); + (void)devif_poll(&priv->dev, kinetis_uiptxpoll); } /**************************************************************************** @@ -758,7 +758,7 @@ static void kinetis_polltimer(int argc, uint32_t arg, ...) * we will missing TCP time state updates? */ - (void)uip_timer(&priv->dev, kinetis_uiptxpoll, KINETIS_POLLHSEC); + (void)devif_timer(&priv->dev, kinetis_uiptxpoll, KINETIS_POLLHSEC); } /* Setup the watchdog poll timer again in any case */ @@ -973,7 +973,7 @@ static int kinetis_txavail(struct net_driver_s *dev) * XMIT data. */ - (void)uip_poll(&priv->dev, kinetis_uiptxpoll); + (void)devif_poll(&priv->dev, kinetis_uiptxpoll); } } diff --git a/arch/arm/src/lpc17xx/lpc17_ethernet.c b/arch/arm/src/lpc17xx/lpc17_ethernet.c index e0093fddb6..f38e5c435d 100644 --- a/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -647,7 +647,7 @@ static int lpc17_transmit(struct lpc17_driver_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -977,7 +977,7 @@ static void lpc17_txdone(struct lpc17_driver_s *priv) else { - (void)uip_poll(&priv->lp_dev, lpc17_uiptxpoll); + (void)devif_poll(&priv->lp_dev, lpc17_uiptxpoll); } } @@ -1188,7 +1188,7 @@ static void lpc17_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->lp_dev, lpc17_uiptxpoll); + (void)devif_poll(&priv->lp_dev, lpc17_uiptxpoll); } } @@ -1225,7 +1225,7 @@ static void lpc17_polltimer(int argc, uint32_t arg, ...) * we will missing TCP time state updates? */ - (void)uip_timer(&priv->lp_dev, lpc17_uiptxpoll, LPC17_POLLHSEC); + (void)devif_timer(&priv->lp_dev, lpc17_uiptxpoll, LPC17_POLLHSEC); } /* Setup the watchdog poll timer again */ @@ -1482,7 +1482,7 @@ static int lpc17_txavail(struct net_driver_s *dev) { /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&priv->lp_dev, lpc17_uiptxpoll); + (void)devif_poll(&priv->lp_dev, lpc17_uiptxpoll); } } diff --git a/arch/arm/src/sam34/sam_emac.c b/arch/arm/src/sam34/sam_emac.c index e3bdecdb22..164c10e0ed 100644 --- a/arch/arm/src/sam34/sam_emac.c +++ b/arch/arm/src/sam34/sam_emac.c @@ -789,7 +789,7 @@ static int sam_transmit(struct sam_emac_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -873,7 +873,7 @@ static void sam_dopoll(struct sam_emac_s *priv) { /* If we have the descriptor, then poll uIP for new XMIT data. */ - (void)uip_poll(dev, sam_uiptxpoll); + (void)devif_poll(dev, sam_uiptxpoll); } } @@ -1517,7 +1517,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) { /* Update TCP timing states and poll uIP for new XMIT data. */ - (void)uip_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); + (void)devif_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); } /* Setup the watchdog poll timer again */ diff --git a/arch/arm/src/sama5/sam_emaca.c b/arch/arm/src/sama5/sam_emaca.c index fca5e2dfd9..715994b710 100644 --- a/arch/arm/src/sama5/sam_emaca.c +++ b/arch/arm/src/sama5/sam_emaca.c @@ -799,7 +799,7 @@ static int sam_transmit(struct sam_emac_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -883,7 +883,7 @@ static void sam_dopoll(struct sam_emac_s *priv) { /* If we have the descriptor, then poll uIP for new XMIT data. */ - (void)uip_poll(dev, sam_uiptxpoll); + (void)devif_poll(dev, sam_uiptxpoll); } } @@ -1558,7 +1558,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) { /* Update TCP timing states and poll uIP for new XMIT data. */ - (void)uip_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); + (void)devif_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); } /* Setup the watchdog poll timer again */ diff --git a/arch/arm/src/sama5/sam_emacb.c b/arch/arm/src/sama5/sam_emacb.c index 0ac775d76d..77d8e15734 100644 --- a/arch/arm/src/sama5/sam_emacb.c +++ b/arch/arm/src/sama5/sam_emacb.c @@ -1114,7 +1114,7 @@ static int sam_transmit(struct sam_emac_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1198,7 +1198,7 @@ static void sam_dopoll(struct sam_emac_s *priv) { /* If we have the descriptor, then poll uIP for new XMIT data. */ - (void)uip_poll(dev, sam_uiptxpoll); + (void)devif_poll(dev, sam_uiptxpoll); } } @@ -1903,7 +1903,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) { /* Update TCP timing states and poll uIP for new XMIT data. */ - (void)uip_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); + (void)devif_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); } /* Setup the watchdog poll timer again */ diff --git a/arch/arm/src/sama5/sam_gmac.c b/arch/arm/src/sama5/sam_gmac.c index f50a698a6a..8048b6ad91 100644 --- a/arch/arm/src/sama5/sam_gmac.c +++ b/arch/arm/src/sama5/sam_gmac.c @@ -731,7 +731,7 @@ static int sam_transmit(struct sam_gmac_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -815,7 +815,7 @@ static void sam_dopoll(struct sam_gmac_s *priv) { /* If we have the descriptor, then poll uIP for new XMIT data. */ - (void)uip_poll(dev, sam_uiptxpoll); + (void)devif_poll(dev, sam_uiptxpoll); } } @@ -1510,7 +1510,7 @@ static void sam_polltimer(int argc, uint32_t arg, ...) { /* Update TCP timing states and poll uIP for new XMIT data. */ - (void)uip_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); + (void)devif_timer(dev, sam_uiptxpoll, SAM_POLLHSEC); } /* Setup the watchdog poll timer again */ diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c index 17cc58a7c8..5b786d87a6 100644 --- a/arch/arm/src/stm32/stm32_eth.c +++ b/arch/arm/src/stm32/stm32_eth.c @@ -1140,7 +1140,7 @@ static int stm32_transmit(FAR struct stm32_ethmac_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1266,7 +1266,7 @@ static void stm32_dopoll(FAR struct stm32_ethmac_s *priv) if (dev->d_buf) { - (void)uip_poll(dev, stm32_uiptxpoll); + (void)devif_poll(dev, stm32_uiptxpoll); /* We will, most likely end up with a buffer to be freed. But it * might not be the same one that we allocated above. @@ -1994,7 +1994,7 @@ static void stm32_polltimer(int argc, uint32_t arg, ...) /* Update TCP timing states and poll uIP for new XMIT data. */ - (void)uip_timer(dev, stm32_uiptxpoll, STM32_POLLHSEC); + (void)devif_timer(dev, stm32_uiptxpoll, STM32_POLLHSEC); /* We will, most likely end up with a buffer to be freed. But it * might not be the same one that we allocated above. diff --git a/arch/arm/src/tiva/tiva_ethernet.c b/arch/arm/src/tiva/tiva_ethernet.c index f33f497f56..a9154b89dc 100644 --- a/arch/arm/src/tiva/tiva_ethernet.c +++ b/arch/arm/src/tiva/tiva_ethernet.c @@ -577,7 +577,7 @@ static int tiva_transmit(struct tiva_driver_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -839,7 +839,7 @@ static void tiva_txdone(struct tiva_driver_s *priv) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->ld_dev, tiva_uiptxpoll); + (void)devif_poll(&priv->ld_dev, tiva_uiptxpoll); } /**************************************************************************** @@ -963,7 +963,7 @@ static void tiva_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->ld_dev, tiva_uiptxpoll); + (void)devif_poll(&priv->ld_dev, tiva_uiptxpoll); } /**************************************************************************** @@ -999,7 +999,7 @@ static void tiva_polltimer(int argc, uint32_t arg, ...) { /* If so, update TCP timing states and poll uIP for new XMIT data */ - (void)uip_timer(&priv->ld_dev, tiva_uiptxpoll, TIVA_POLLHSEC); + (void)devif_timer(&priv->ld_dev, tiva_uiptxpoll, TIVA_POLLHSEC); /* Setup the watchdog poll timer again */ @@ -1285,7 +1285,7 @@ static int tiva_txavail(struct net_driver_s *dev) * for new Tx data */ - (void)uip_poll(&priv->ld_dev, tiva_uiptxpoll); + (void)devif_poll(&priv->ld_dev, tiva_uiptxpoll); } irqrestore(flags); diff --git a/arch/hc/src/m9s12/m9s12_ethernet.c b/arch/hc/src/m9s12/m9s12_ethernet.c index 9b759e74a3..27f1764924 100644 --- a/arch/hc/src/m9s12/m9s12_ethernet.c +++ b/arch/hc/src/m9s12/m9s12_ethernet.c @@ -183,7 +183,7 @@ static int emac_transmit(FAR struct emac_driver_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -323,7 +323,7 @@ static void emac_txdone(FAR struct emac_driver_s *priv) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->d_dev, emac_uiptxpoll); + (void)devif_poll(&priv->d_dev, emac_uiptxpoll); } /**************************************************************************** @@ -394,7 +394,7 @@ static void emac_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->d_dev, emac_uiptxpoll); + (void)devif_poll(&priv->d_dev, emac_uiptxpoll); } /**************************************************************************** @@ -428,7 +428,7 @@ static void emac_polltimer(int argc, uint32_t arg, ...) * we will missing TCP time state updates? */ - (void)uip_timer(&priv->d_dev, emac_uiptxpoll, HCS12_POLLHSEC); + (void)devif_timer(&priv->d_dev, emac_uiptxpoll, HCS12_POLLHSEC); /* Setup the watchdog poll timer again */ @@ -554,7 +554,7 @@ static int emac_txavail(struct net_driver_s *dev) /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&priv->d_dev, emac_uiptxpoll); + (void)devif_poll(&priv->d_dev, emac_uiptxpoll); } irqrestore(flags); diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.c b/arch/mips/src/pic32mx/pic32mx-ethernet.c index ef298668df..8858a63a04 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx-ethernet.c @@ -1113,7 +1113,7 @@ static int pic32mx_transmit(struct pic32mx_driver_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1212,7 +1212,7 @@ static void pic32mx_poll(struct pic32mx_driver_s *priv) /* And perform the poll */ priv->pd_polling = true; - (void)uip_poll(&priv->pd_dev, pic32mx_uiptxpoll); + (void)devif_poll(&priv->pd_dev, pic32mx_uiptxpoll); /* Free any buffer left attached after the poll */ @@ -1258,7 +1258,7 @@ static void pic32mx_timerpoll(struct pic32mx_driver_s *priv) /* And perform the poll */ priv->pd_polling = true; - (void)uip_timer(&priv->pd_dev, pic32mx_uiptxpoll, PIC32MX_POLLHSEC); + (void)devif_timer(&priv->pd_dev, pic32mx_uiptxpoll, PIC32MX_POLLHSEC); /* Free any buffer left attached after the poll */ diff --git a/arch/sim/src/up_uipdriver.c b/arch/sim/src/up_uipdriver.c index fd18b515e0..7bf11244aa 100644 --- a/arch/sim/src/up_uipdriver.c +++ b/arch/sim/src/up_uipdriver.c @@ -202,7 +202,7 @@ void uipdriver_loop(void) else if (timer_expired(&g_periodic_timer)) { timer_reset(&g_periodic_timer); - uip_timer(&g_sim_dev, sim_uiptxpoll, 1); + devif_timer(&g_sim_dev, sim_uiptxpoll, 1); } sched_unlock(); } diff --git a/arch/z80/src/ez80/ez80_emac.c b/arch/z80/src/ez80/ez80_emac.c index f671737936..26c9f41939 100644 --- a/arch/z80/src/ez80/ez80_emac.c +++ b/arch/z80/src/ez80/ez80_emac.c @@ -1048,7 +1048,7 @@ static int ez80emac_transmit(struct ez80emac_driver_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1578,7 +1578,7 @@ static void ez80emac_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, ez80emac_uiptxpoll); + (void)devif_poll(&priv->dev, ez80emac_uiptxpoll); } /**************************************************************************** @@ -1604,7 +1604,7 @@ static void ez80emac_polltimer(int argc, uint32_t arg, ...) /* Poll uIP for new XMIT data */ - (void)uip_timer(&priv->dev, ez80emac_uiptxpoll, EMAC_POLLHSEC); + (void)devif_timer(&priv->dev, ez80emac_uiptxpoll, EMAC_POLLHSEC); /* Setup the watchdog poll timer again */ @@ -1791,7 +1791,7 @@ static int ez80emac_txavail(struct net_driver_s *dev) /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, ez80emac_uiptxpoll); + (void)devif_poll(&priv->dev, ez80emac_uiptxpoll); } irqrestore(flags); diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 38906b082d..9bb17ac4c6 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -311,7 +311,7 @@ static int cs89x0_transmit(struct cs89x0_driver_s *cs89x0) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -518,7 +518,7 @@ static void cs89x0_txdone(struct cs89x0_driver_s *cs89x0, uint16_t isq) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&cs89x0->cs_dev, cs89x0_uiptxpoll); + (void)devif_poll(&cs89x0->cs_dev, cs89x0_uiptxpoll); } /**************************************************************************** @@ -663,7 +663,7 @@ static void cs89x0_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&cs89x0->cs_dev, cs89x0_uiptxpoll); + (void)devif_poll(&cs89x0->cs_dev, cs89x0_uiptxpoll); } /**************************************************************************** @@ -692,7 +692,7 @@ static void cs89x0_polltimer(int argc, uint32_t arg, ...) /* If so, update TCP timing states and poll uIP for new XMIT data */ - (void)uip_timer(&cs89x0->cs_dev, cs89x0_uiptxpoll, CS89x0_POLLHSEC); + (void)devif_timer(&cs89x0->cs_dev, cs89x0_uiptxpoll, CS89x0_POLLHSEC); /* Setup the watchdog poll timer again */ @@ -811,7 +811,7 @@ static int cs89x0_txavail(struct net_driver_s *dev) /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&cs89x0->cs_dev, cs89x0_uiptxpoll); + (void)devif_poll(&cs89x0->cs_dev, cs89x0_uiptxpoll); } irqrestore(flags); diff --git a/drivers/net/dm90x0.c b/drivers/net/dm90x0.c index 58e9901bb7..6127defa79 100644 --- a/drivers/net/dm90x0.c +++ b/drivers/net/dm90x0.c @@ -823,7 +823,7 @@ static int dm9x_transmit(struct dm9x_driver_s *dm9x) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the DM90x0 is reset @@ -1086,7 +1086,7 @@ static void dm9x_txdone(struct dm9x_driver_s *dm9x) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&dm9x->dm_dev, dm9x_uiptxpoll); + (void)devif_poll(&dm9x->dm_dev, dm9x_uiptxpoll); } /**************************************************************************** @@ -1249,7 +1249,7 @@ static void dm9x_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&dm9x->dm_dev, dm9x_uiptxpoll); + (void)devif_poll(&dm9x->dm_dev, dm9x_uiptxpoll); } /**************************************************************************** @@ -1291,7 +1291,7 @@ static void dm9x_polltimer(int argc, uint32_t arg, ...) { /* If so, update TCP timing states and poll uIP for new XMIT data */ - (void)uip_timer(&dm9x->dm_dev, dm9x_uiptxpoll, DM6X_POLLHSEC); + (void)devif_timer(&dm9x->dm_dev, dm9x_uiptxpoll, DM6X_POLLHSEC); } /* Setup the watchdog poll timer again */ @@ -1499,7 +1499,7 @@ static int dm9x_txavail(struct net_driver_s *dev) { /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&dm9x->dm_dev, dm9x_uiptxpoll); + (void)devif_poll(&dm9x->dm_dev, dm9x_uiptxpoll); } } irqrestore(flags); diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 272101290f..b800ca9492 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -457,7 +457,7 @@ static int e1000_transmit(struct e1000_dev *e1000) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -641,7 +641,7 @@ static void e1000_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&e1000->netdev, e1000_uiptxpoll); + (void)devif_poll(&e1000->netdev, e1000_uiptxpoll); } /**************************************************************************** @@ -681,7 +681,7 @@ static void e1000_polltimer(int argc, uint32_t arg, ...) * we will missing TCP time state updates? */ - (void)uip_timer(&e1000->netdev, e1000_uiptxpoll, E1000_POLLHSEC); + (void)devif_timer(&e1000->netdev, e1000_uiptxpoll, E1000_POLLHSEC); /* Setup the watchdog poll timer again */ @@ -819,7 +819,7 @@ static int e1000_txavail(struct net_driver_s *dev) if (e1000->tx_ring.desc[tail].desc_status) { - (void)uip_poll(&e1000->netdev, e1000_uiptxpoll); + (void)devif_poll(&e1000->netdev, e1000_uiptxpoll); } } @@ -938,7 +938,7 @@ static irqreturn_t e1000_interrupt_handler(int irq, void *dev_id) if (intr_cause & (1<<0)) { - uip_poll(&e1000->netdev, e1000_uiptxpoll); + devif_poll(&e1000->netdev, e1000_uiptxpoll); } diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index e3d9d47aa9..67cae3af25 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -1167,7 +1167,7 @@ static int enc_transmit(FAR struct enc_driver_s *priv) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -1276,7 +1276,7 @@ static void enc_txif(FAR struct enc_driver_s *priv) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, enc_uiptxpoll); + (void)devif_poll(&priv->dev, enc_uiptxpoll); } /**************************************************************************** @@ -1835,7 +1835,7 @@ static void enc_toworker(FAR void *arg) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, enc_uiptxpoll); + (void)devif_poll(&priv->dev, enc_uiptxpoll); /* Release lock on uIP */ @@ -1924,7 +1924,7 @@ static void enc_pollworker(FAR void *arg) * in progress, we will missing TCP time state updates? */ - (void)uip_timer(&priv->dev, enc_uiptxpoll, ENC_POLLHSEC); + (void)devif_timer(&priv->dev, enc_uiptxpoll, ENC_POLLHSEC); } /* Release lock on the SPI bus and uIP */ @@ -2144,7 +2144,7 @@ static int enc_txavail(struct net_driver_s *dev) { /* The interface is up and TX is idle; poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, enc_uiptxpoll); + (void)devif_poll(&priv->dev, enc_uiptxpoll); } } diff --git a/drivers/net/encx24j600.c b/drivers/net/encx24j600.c index a0d90761a7..2665f96943 100644 --- a/drivers/net/encx24j600.c +++ b/drivers/net/encx24j600.c @@ -1179,7 +1179,7 @@ static int enc_txenqueue(FAR struct enc_driver_s *priv) * * Description: * Enqueues uIP packets if available. - * This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timedout and the interface is reset @@ -1305,7 +1305,7 @@ static void enc_txif(FAR struct enc_driver_s *priv) /* Poll for uip packets */ - uip_poll(&priv->dev, enc_uiptxpoll); + devif_poll(&priv->dev, enc_uiptxpoll); } else { @@ -2005,7 +2005,7 @@ static void enc_toworker(FAR void *arg) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, enc_uiptxpoll); + (void)devif_poll(&priv->dev, enc_uiptxpoll); /* Release uIP */ @@ -2095,7 +2095,7 @@ static void enc_pollworker(FAR void *arg) * in progress, we will missing TCP time state updates? */ - (void)uip_timer(&priv->dev, enc_uiptxpoll, ENC_POLLHSEC); + (void)devif_timer(&priv->dev, enc_uiptxpoll, ENC_POLLHSEC); } /* Release lock on the SPI bus and uIP */ @@ -2321,7 +2321,7 @@ static int enc_txavail(struct net_driver_s *dev) { /* The interface is up and TX is idle; poll uIP for new XMIT data */ - (void)uip_poll(&priv->dev, enc_uiptxpoll); + (void)devif_poll(&priv->dev, enc_uiptxpoll); } } diff --git a/drivers/net/skeleton.c b/drivers/net/skeleton.c index 129554c3f9..a7ce5c68b9 100644 --- a/drivers/net/skeleton.c +++ b/drivers/net/skeleton.c @@ -183,7 +183,7 @@ static int skel_transmit(FAR struct skel_driver_s *skel) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -323,7 +323,7 @@ static void skel_txdone(FAR struct skel_driver_s *skel) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&skel->sk_dev, skel_uiptxpoll); + (void)devif_poll(&skel->sk_dev, skel_uiptxpoll); } /**************************************************************************** @@ -394,7 +394,7 @@ static void skel_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&skel->sk_dev, skel_uiptxpoll); + (void)devif_poll(&skel->sk_dev, skel_uiptxpoll); } /**************************************************************************** @@ -428,7 +428,7 @@ static void skel_polltimer(int argc, uint32_t arg, ...) * we will missing TCP time state updates? */ - (void)uip_timer(&skel->sk_dev, skel_uiptxpoll, skeleton_POLLHSEC); + (void)devif_timer(&skel->sk_dev, skel_uiptxpoll, skeleton_POLLHSEC); /* Setup the watchdog poll timer again */ @@ -554,7 +554,7 @@ static int skel_txavail(struct net_driver_s *dev) /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&skel->sk_dev, skel_uiptxpoll); + (void)devif_poll(&skel->sk_dev, skel_uiptxpoll); } irqrestore(flags); diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 1bc0a9d185..7746c4e20c 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -402,7 +402,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv) * * Description: * Check if uIP has any outgoing packets ready to send. This is a - * callback from uip_poll(). uip_poll() may be called: + * callback from devif_poll(). devif_poll() may be called: * * 1. When the preceding TX packet send is complete, or * 2. When the preceding TX packet send times o ]ut and the interface is reset @@ -495,7 +495,7 @@ static void slip_txtask(int argc, char *argv[]) flags = net_lock(); priv->dev.d_buf = priv->txbuf; - (void)uip_timer(&priv->dev, slip_uiptxpoll, SLIP_POLLHSEC); + (void)devif_timer(&priv->dev, slip_uiptxpoll, SLIP_POLLHSEC); net_unlock(flags); slip_semgive(priv); } diff --git a/drivers/net/vnet.c b/drivers/net/vnet.c index c00e612b71..d3db255e3c 100644 --- a/drivers/net/vnet.c +++ b/drivers/net/vnet.c @@ -202,7 +202,7 @@ static int vnet_transmit(FAR struct vnet_driver_s *vnet) * * Description: * The transmitter is available, check if uIP has any outgoing packets ready - * to send. This is a callback from uip_poll(). uip_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, * 2. When the preceding TX packet send timesout and the interface is reset @@ -345,7 +345,7 @@ static void vnet_txdone(FAR struct vnet_driver_s *vnet) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll); + (void)devif_poll(&vnet->sk_dev, vnet_uiptxpoll); } /**************************************************************************** @@ -377,7 +377,7 @@ static void vnet_txtimeout(int argc, uint32_t arg, ...) /* Then poll uIP for new XMIT data */ - (void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll); + (void)devif_poll(&vnet->sk_dev, vnet_uiptxpoll); } /**************************************************************************** @@ -417,7 +417,7 @@ static void vnet_polltimer(int argc, uint32_t arg, ...) * we will missing TCP time state updates? */ - (void)uip_timer(&vnet->sk_dev, vnet_uiptxpoll, VNET_POLLHSEC); + (void)devif_timer(&vnet->sk_dev, vnet_uiptxpoll, VNET_POLLHSEC); /* Setup the watchdog poll timer again */ @@ -545,7 +545,7 @@ static int vnet_txavail(struct net_driver_s *dev) /* If so, then poll uIP for new XMIT data */ - (void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll); + (void)devif_poll(&vnet->sk_dev, vnet_uiptxpoll); } out: diff --git a/include/nuttx/net/netdev.h b/include/nuttx/net/netdev.h index 01f17a7692..479ea3dcd4 100644 --- a/include/nuttx/net/netdev.h +++ b/include/nuttx/net/netdev.h @@ -163,8 +163,8 @@ struct net_driver_s uint16_t d_len; - /* When d_buf contains outgoing xmit data, d_sndlen is nonzero and represents - * the amount of appllcation data after d_snddata + /* When d_buf contains outgoing xmit data, d_sndlen is non-zero and represents + * the amount of application data after d_snddata */ uint16_t d_sndlen; @@ -196,6 +196,8 @@ struct net_driver_s void *d_private; }; +typedef int (*devif_poll_callback_t)(struct net_driver_s *dev); + /**************************************************************************** * Public Variables ****************************************************************************/ @@ -268,15 +270,15 @@ int devif_input(struct net_driver_s *dev); /* Polling of connections * * These functions will traverse each active uIP connection structure and - * perform appropriate operatios: uip_timer() will perform TCP timer - * operations (and UDP polling operations); uip_poll() will perform TCP + * perform appropriate operations: devif_timer() will perform TCP timer + * operations (and UDP polling operations); devif_poll() will perform TCP * and UDP polling operations. The CAN driver MUST implement logic to - * periodically call uip_timer(); uip_poll() may be called asychronously + * periodically call devif_timer(); devif_poll() may be called asynchronously * from the network driver can accept another outgoing packet. * * In both cases, these functions will call the provided callback function * for every active connection. Polling will continue until all connections - * have been polled or until the user-suplied function returns a non-zero + * have been polled or until the user-supplied function returns a non-zero * value (which it should do only if it cannot accept further write data). * * When the callback function is called, there may be an outbound packet @@ -296,7 +298,7 @@ int devif_input(struct net_driver_s *dev); * } * * ... - * uip_poll(dev, driver_callback); + * devif_poll(dev, driver_callback); * * Note: If you are writing a uIP device driver that needs ARP (Address * Resolution Protocol), e.g., when running uIP over Ethernet, you will @@ -315,9 +317,8 @@ int devif_input(struct net_driver_s *dev); * } */ -typedef int (*uip_poll_callback_t)(struct net_driver_s *dev); -int uip_poll(struct net_driver_s *dev, uip_poll_callback_t callback); -int uip_timer(struct net_driver_s *dev, uip_poll_callback_t callback, int hsec); +int devif_poll(struct net_driver_s *dev, devif_poll_callback_t callback); +int devif_timer(struct net_driver_s *dev, devif_poll_callback_t callback, int hsec); /* Carrier detection * Call netdev_carrier_on when the carrier has become available and the device diff --git a/net/devif/devif_poll.c b/net/devif/devif_poll.c index afaa161a35..95698eaad4 100644 --- a/net/devif/devif_poll.c +++ b/net/devif/devif_poll.c @@ -75,7 +75,7 @@ #if defined(CONFIG_NET_PKT) static int devif_poll_pkt_connections(FAR struct net_driver_s *dev, - uip_poll_callback_t callback) + devif_poll_callback_t callback) { FAR struct pkt_conn_s *pkt_conn = NULL; int bstop = 0; @@ -111,7 +111,7 @@ static int devif_poll_pkt_connections(FAR struct net_driver_s *dev, #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) static inline int devif_poll_icmp(FAR struct net_driver_s *dev, - uip_poll_callback_t callback) + devif_poll_callback_t callback) { /* Perform the UDP TX poll */ @@ -137,7 +137,7 @@ static inline int devif_poll_icmp(FAR struct net_driver_s *dev, #ifdef CONFIG_NET_IGMP static inline int devif_poll_igmp(FAR struct net_driver_s *dev, - uip_poll_callback_t callback) + devif_poll_callback_t callback) { /* Perform the IGMP TX poll */ @@ -163,7 +163,7 @@ static inline int devif_poll_igmp(FAR struct net_driver_s *dev, #ifdef CONFIG_NET_UDP static int devif_poll_udp_connections(FAR struct net_driver_s *dev, - uip_poll_callback_t callback) + devif_poll_callback_t callback) { FAR struct udp_conn_s *conn = NULL; int bstop = 0; @@ -199,7 +199,7 @@ static int devif_poll_udp_connections(FAR struct net_driver_s *dev, #ifdef CONFIG_NET_TCP static inline int devif_poll_tcp_connections(FAR struct net_driver_s *dev, - uip_poll_callback_t callback) + devif_poll_callback_t callback) { FAR struct tcp_conn_s *conn = NULL; int bstop = 0; @@ -238,7 +238,7 @@ static inline int devif_poll_tcp_connections(FAR struct net_driver_s *dev, #ifdef CONFIG_NET_TCP static inline int devif_poll_tcp_timer(FAR struct net_driver_s *dev, - uip_poll_callback_t callback, int hsec) + devif_poll_callback_t callback, int hsec) { FAR struct tcp_conn_s *conn = NULL; int bstop = 0; @@ -267,11 +267,11 @@ static inline int devif_poll_tcp_timer(FAR struct net_driver_s *dev, ****************************************************************************/ /**************************************************************************** - * Function: uip_poll + * Function: devif_poll * * Description: * This function will traverse each active uIP connection structure and - * will perform TCP and UDP polling operations. uip_poll() may be called + * will perform TCP and UDP polling operations. devif_poll() may be called * asynchronously with the network driver can accept another outgoing * packet. * @@ -291,7 +291,7 @@ static inline int devif_poll_tcp_timer(FAR struct net_driver_s *dev, * ****************************************************************************/ -int uip_poll(FAR struct net_driver_s *dev, uip_poll_callback_t callback) +int devif_poll(FAR struct net_driver_s *dev, devif_poll_callback_t callback) { int bstop; @@ -343,12 +343,12 @@ int uip_poll(FAR struct net_driver_s *dev, uip_poll_callback_t callback) } /**************************************************************************** - * Function: uip_timer + * Function: devif_timer * * Description: * These function will traverse each active uIP connection structure and * perform TCP timer operations (and UDP polling operations). The Ethernet - * driver MUST implement logic to periodically call uip_timer(). + * driver MUST implement logic to periodically call devif_timer(). * * This function will call the provided callback function for every active * connection. Polling will continue until all connections have been polled @@ -366,8 +366,8 @@ int uip_poll(FAR struct net_driver_s *dev, uip_poll_callback_t callback) * ****************************************************************************/ -int uip_timer(FAR struct net_driver_s *dev, uip_poll_callback_t callback, - int hsec) +int devif_timer(FAR struct net_driver_s *dev, devif_poll_callback_t callback, + int hsec) { int bstop;