summaryrefslogtreecommitdiff
path: root/nuttx/drivers
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-06-26 14:23:21 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-06-26 14:23:21 -0600
commit54e2e924a10fe187c991ccad392b161007163bf5 (patch)
treed7d5e49406a82224ca8166948d700f82d0044c80 /nuttx/drivers
parentf6156f8cce3bc7a944b295aeb9c027e46eeddcf3 (diff)
downloadpx4-nuttx-54e2e924a10fe187c991ccad392b161007163bf5.tar.gz
px4-nuttx-54e2e924a10fe187c991ccad392b161007163bf5.tar.bz2
px4-nuttx-54e2e924a10fe187c991ccad392b161007163bf5.zip
Move files to net/utils; make appropriate name changes, most for uip_lock to net_lock
Diffstat (limited to 'nuttx/drivers')
-rw-r--r--nuttx/drivers/net/enc28j60.c18
-rw-r--r--nuttx/drivers/net/encx24j600.c18
-rw-r--r--nuttx/drivers/net/slip.c12
3 files changed, 24 insertions, 24 deletions
diff --git a/nuttx/drivers/net/enc28j60.c b/nuttx/drivers/net/enc28j60.c
index 516219487..c657c18c9 100644
--- a/nuttx/drivers/net/enc28j60.c
+++ b/nuttx/drivers/net/enc28j60.c
@@ -1543,14 +1543,14 @@ static void enc_pktif(FAR struct enc_driver_s *priv)
static void enc_irqworker(FAR void *arg)
{
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg;
- uip_lock_t lock;
+ net_lock_t lock;
uint8_t eir;
DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */
- lock = uip_lock();
+ lock = net_lock();
enc_lock(priv);
/* Disable further interrupts by clearing the global interrupt enable bit.
@@ -1746,7 +1746,7 @@ static void enc_irqworker(FAR void *arg)
/* Release lock on the SPI bus and uIP */
enc_unlock(priv);
- uip_unlock(lock);
+ net_unlock(lock);
}
/****************************************************************************
@@ -1808,7 +1808,7 @@ static int enc_interrupt(int irq, FAR void *context)
static void enc_toworker(FAR void *arg)
{
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg;
- uip_lock_t lock;
+ net_lock_t lock;
int ret;
nlldbg("Tx timeout\n");
@@ -1816,7 +1816,7 @@ static void enc_toworker(FAR void *arg)
/* Get exclusive access to uIP */
- lock = uip_lock();
+ lock = net_lock();
/* Increment statistics and dump debug info */
@@ -1839,7 +1839,7 @@ static void enc_toworker(FAR void *arg)
/* Release lock on uIP */
- uip_unlock(lock);
+ net_unlock(lock);
}
/****************************************************************************
@@ -1902,13 +1902,13 @@ static void enc_txtimeout(int argc, uint32_t arg, ...)
static void enc_pollworker(FAR void *arg)
{
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg;
- uip_lock_t lock;
+ net_lock_t lock;
DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */
- lock = uip_lock();
+ lock = net_lock();
enc_lock(priv);
/* Verify that the hardware is ready to send another packet. The driver
@@ -1930,7 +1930,7 @@ static void enc_pollworker(FAR void *arg)
/* Release lock on the SPI bus and uIP */
enc_unlock(priv);
- uip_unlock(lock);
+ net_unlock(lock);
/* Setup the watchdog poll timer again */
diff --git a/nuttx/drivers/net/encx24j600.c b/nuttx/drivers/net/encx24j600.c
index db3260e39..8beaf9d7f 100644
--- a/nuttx/drivers/net/encx24j600.c
+++ b/nuttx/drivers/net/encx24j600.c
@@ -1762,14 +1762,14 @@ static void enc_rxabtif(FAR struct enc_driver_s *priv)
static void enc_irqworker(FAR void *arg)
{
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg;
- uip_lock_t lock;
+ net_lock_t lock;
uint16_t eir;
DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */
- lock = uip_lock();
+ lock = net_lock();
enc_lock(priv);
/* A good practice is for the host controller to clear the Global Interrupt
@@ -1915,7 +1915,7 @@ static void enc_irqworker(FAR void *arg)
/* Release lock on the SPI bus and uIP */
enc_unlock(priv);
- uip_unlock(lock);
+ net_unlock(lock);
}
/****************************************************************************
@@ -1977,7 +1977,7 @@ static int enc_interrupt(int irq, FAR void *context)
static void enc_toworker(FAR void *arg)
{
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg;
- uip_lock_t lock;
+ net_lock_t lock;
int ret;
nlldbg("Tx timeout\n");
@@ -1985,7 +1985,7 @@ static void enc_toworker(FAR void *arg)
/* Get exclusive access to uIP. */
- lock = uip_lock();
+ lock = net_lock();
/* Increment statistics and dump debug info */
@@ -2009,7 +2009,7 @@ static void enc_toworker(FAR void *arg)
/* Release uIP */
- uip_unlock(lock);
+ net_unlock(lock);
}
/****************************************************************************
@@ -2073,13 +2073,13 @@ static void enc_txtimeout(int argc, uint32_t arg, ...)
static void enc_pollworker(FAR void *arg)
{
FAR struct enc_driver_s *priv = (FAR struct enc_driver_s *)arg;
- uip_lock_t lock;
+ net_lock_t lock;
DEBUGASSERT(priv);
/* Get exclusive access to both uIP and the SPI bus. */
- lock = uip_lock();
+ lock = net_lock();
enc_lock(priv);
/* Verify that the hardware is ready to send another packet. The driver
@@ -2101,7 +2101,7 @@ static void enc_pollworker(FAR void *arg)
/* Release lock on the SPI bus and uIP */
enc_unlock(priv);
- uip_unlock(lock);
+ net_unlock(lock);
/* Setup the watchdog poll timer again */
diff --git a/nuttx/drivers/net/slip.c b/nuttx/drivers/net/slip.c
index 01caecba6..c1d669183 100644
--- a/nuttx/drivers/net/slip.c
+++ b/nuttx/drivers/net/slip.c
@@ -457,7 +457,7 @@ static void slip_txtask(int argc, char *argv[])
{
FAR struct slip_driver_s *priv;
unsigned int index = *(argv[1]) - '0';
- uip_lock_t flags;
+ net_lock_t flags;
ndbg("index: %d\n", index);
DEBUGASSERT(index < CONFIG_SLIP_NINTERFACES);
@@ -493,10 +493,10 @@ static void slip_txtask(int argc, char *argv[])
* (above), it may be larger.
*/
- flags = uip_lock();
+ flags = net_lock();
priv->dev.d_buf = priv->txbuf;
(void)uip_timer(&priv->dev, slip_uiptxpoll, SLIP_POLLHSEC);
- uip_unlock(flags);
+ net_unlock(flags);
slip_semgive(priv);
}
}
@@ -646,7 +646,7 @@ static int slip_rxtask(int argc, char *argv[])
{
FAR struct slip_driver_s *priv;
unsigned int index = *(argv[1]) - '0';
- uip_lock_t flags;
+ net_lock_t flags;
int ch;
ndbg("index: %d\n", index);
@@ -717,7 +717,7 @@ static int slip_rxtask(int argc, char *argv[])
priv->dev.d_buf = priv->rxbuf;
priv->dev.d_len = priv->rxlen;
- flags = uip_lock();
+ flags = net_lock();
uip_input(&priv->dev);
/* If the above function invocation resulted in data that should
@@ -729,7 +729,7 @@ static int slip_rxtask(int argc, char *argv[])
{
slip_transmit(priv);
}
- uip_unlock(flags);
+ net_unlock(flags);
slip_semgive(priv);
}
else