aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/slip.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/slip.c')
-rw-r--r--drivers/net/slip.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 1d58991d395b..8e1c0baf6958 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -365,7 +365,6 @@ static void sl_bump(struct slip *sl)
365 skb_reset_mac_header(skb); 365 skb_reset_mac_header(skb);
366 skb->protocol = htons(ETH_P_IP); 366 skb->protocol = htons(ETH_P_IP);
367 netif_rx(skb); 367 netif_rx(skb);
368 sl->dev->last_rx = jiffies;
369 sl->rx_packets++; 368 sl->rx_packets++;
370} 369}
371 370
@@ -402,7 +401,7 @@ static void sl_encaps(struct slip *sl, unsigned char *icp, int len)
402 * if we did not request it before write operation. 401 * if we did not request it before write operation.
403 * 14 Oct 1994 Dmitry Gorodchanin. 402 * 14 Oct 1994 Dmitry Gorodchanin.
404 */ 403 */
405 sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); 404 set_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
406 actual = sl->tty->ops->write(sl->tty, sl->xbuff, count); 405 actual = sl->tty->ops->write(sl->tty, sl->xbuff, count);
407#ifdef SL_CHECK_TRANSMIT 406#ifdef SL_CHECK_TRANSMIT
408 sl->dev->trans_start = jiffies; 407 sl->dev->trans_start = jiffies;
@@ -432,7 +431,7 @@ static void slip_write_wakeup(struct tty_struct *tty)
432 /* Now serial buffer is almost free & we can start 431 /* Now serial buffer is almost free & we can start
433 * transmission of another packet */ 432 * transmission of another packet */
434 sl->tx_packets++; 433 sl->tx_packets++;
435 tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 434 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
436 sl_unlock(sl); 435 sl_unlock(sl);
437 return; 436 return;
438 } 437 }
@@ -465,7 +464,7 @@ static void sl_tx_timeout(struct net_device *dev)
465 (tty_chars_in_buffer(sl->tty) || sl->xleft) ? 464 (tty_chars_in_buffer(sl->tty) || sl->xleft) ?
466 "bad line quality" : "driver error"); 465 "bad line quality" : "driver error");
467 sl->xleft = 0; 466 sl->xleft = 0;
468 sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 467 clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
469 sl_unlock(sl); 468 sl_unlock(sl);
470#endif 469#endif
471 } 470 }
@@ -515,10 +514,9 @@ sl_close(struct net_device *dev)
515 struct slip *sl = netdev_priv(dev); 514 struct slip *sl = netdev_priv(dev);
516 515
517 spin_lock_bh(&sl->lock); 516 spin_lock_bh(&sl->lock);
518 if (sl->tty) { 517 if (sl->tty)
519 /* TTY discipline is running. */ 518 /* TTY discipline is running. */
520 sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); 519 clear_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
521 }
522 netif_stop_queue(dev); 520 netif_stop_queue(dev);
523 sl->rcount = 0; 521 sl->rcount = 0;
524 sl->xleft = 0; 522 sl->xleft = 0;