drivers/net/slip.c: Fix another compilation error

This commit is contained in:
Gregory Nutt
2015-08-02 07:20:36 -06:00
parent 3a109315ed
commit 15db2a45a4
4 changed files with 13 additions and 8 deletions
+3 -3
View File
@@ -10776,7 +10776,7 @@
Based comments from Anton D. Kachalov (2015-07-29).
* STM32 F4: Add DMA support to the ADC driver for STM32 F4. From
Max Kriegler (2015-07-30).
* sem_tickwait(): Added this furnction for internaluse within the
* sem_tickwait(): Added this function for internal use within the
OS. It is a non-standard but more efficient version of sem_timedwait()
for use in higher performance device drviers (2015-08-01).
for use in higher performance device drivers (2015-08-01).
* drivers/net/slip.c: Fix another compilation error (2015-08-02).
+1 -1
Submodule arch updated: 098a35f7dd...d99e8ced38
+8 -3
View File
@@ -405,8 +405,7 @@ static int slip_transmit(FAR struct slip_driver_s *priv)
* 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
* 3. During normal TX polling
* 2. During normal periodic polling
*
* Parameters:
* dev - Reference to the NuttX driver state structure
@@ -506,16 +505,22 @@ static void slip_txtask(int argc, FAR char *argv[])
flags = net_lock();
priv->dev.d_buf = priv->txbuf;
/* Has a half second elapsed since the last timer poll? */
msec_now = clock_systimer() * MSEC_PER_TICK;
hsec = (unsigned int)(msec_now - msec_start) / (MSEC_PER_SEC / 2);
if (hsec)
{
/* Yes, perform the timer poll */
(void)devif_timer(&priv->dev, slip_txpoll, hsec);
msec_start += hsec * (MSEC_PER_SEC / 2);
}
else
{
(void)devif_poll(&priv->dev, slip_uiptxpoll);
/* No, perform the normal TX poll */
(void)devif_poll(&priv->dev, slip_txpoll);
}
net_unlock(flags);
+1 -1
View File
@@ -136,7 +136,7 @@ int sem_tickwait(FAR sem_t *sem, uint32_t start, uint32_t delay)
/* Adjust the delay for any time since the delay was calculated */
elapsed = clock_systimer() - start;
if (elapsed >= (UINT32_MAX / 2) || elapsed >= delay)
if (/*elapsed >= (UINT32_MAX / 2) || */ elapsed >= delay)
{
ret = -ETIMEDOUT;
goto errout_with_irqdisabled;