diff options
Diffstat (limited to 'drivers/net/wireless/strip.c')
-rw-r--r-- | drivers/net/wireless/strip.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index 417e9e675fac..dd0de3a9ed4e 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c | |||
@@ -1234,7 +1234,7 @@ static void ResetRadio(struct strip *strip_info) | |||
1234 | 1234 | ||
1235 | static void strip_write_some_more(struct tty_struct *tty) | 1235 | static void strip_write_some_more(struct tty_struct *tty) |
1236 | { | 1236 | { |
1237 | struct strip *strip_info = (struct strip *) tty->disc_data; | 1237 | struct strip *strip_info = tty->disc_data; |
1238 | 1238 | ||
1239 | /* First make sure we're connected. */ | 1239 | /* First make sure we're connected. */ |
1240 | if (!strip_info || strip_info->magic != STRIP_MAGIC || | 1240 | if (!strip_info || strip_info->magic != STRIP_MAGIC || |
@@ -1252,7 +1252,7 @@ static void strip_write_some_more(struct tty_struct *tty) | |||
1252 | #endif | 1252 | #endif |
1253 | } else { /* Else start transmission of another packet */ | 1253 | } else { /* Else start transmission of another packet */ |
1254 | 1254 | ||
1255 | tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); | 1255 | clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); |
1256 | strip_unlock(strip_info); | 1256 | strip_unlock(strip_info); |
1257 | } | 1257 | } |
1258 | } | 1258 | } |
@@ -1455,8 +1455,7 @@ static void strip_send(struct strip *strip_info, struct sk_buff *skb) | |||
1455 | */ | 1455 | */ |
1456 | strip_info->tx_head = strip_info->tx_buff; | 1456 | strip_info->tx_head = strip_info->tx_buff; |
1457 | strip_info->tx_left = ptr - strip_info->tx_buff; | 1457 | strip_info->tx_left = ptr - strip_info->tx_buff; |
1458 | strip_info->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); | 1458 | set_bit(TTY_DO_WRITE_WAKEUP, &strip_info->tty->flags); |
1459 | |||
1460 | /* | 1459 | /* |
1461 | * 4. Debugging check to make sure we're not overflowing the buffer. | 1460 | * 4. Debugging check to make sure we're not overflowing the buffer. |
1462 | */ | 1461 | */ |
@@ -1997,7 +1996,6 @@ static void deliver_packet(struct strip *strip_info, STRIP_Header * header, | |||
1997 | #ifdef EXT_COUNTERS | 1996 | #ifdef EXT_COUNTERS |
1998 | strip_info->rx_bytes += packetlen; | 1997 | strip_info->rx_bytes += packetlen; |
1999 | #endif | 1998 | #endif |
2000 | skb->dev->last_rx = jiffies; | ||
2001 | netif_rx(skb); | 1999 | netif_rx(skb); |
2002 | } | 2000 | } |
2003 | } | 2001 | } |
@@ -2261,7 +2259,7 @@ static void process_message(struct strip *strip_info) | |||
2261 | static void strip_receive_buf(struct tty_struct *tty, const unsigned char *cp, | 2259 | static void strip_receive_buf(struct tty_struct *tty, const unsigned char *cp, |
2262 | char *fp, int count) | 2260 | char *fp, int count) |
2263 | { | 2261 | { |
2264 | struct strip *strip_info = (struct strip *) tty->disc_data; | 2262 | struct strip *strip_info = tty->disc_data; |
2265 | const unsigned char *end = cp + count; | 2263 | const unsigned char *end = cp + count; |
2266 | 2264 | ||
2267 | if (!strip_info || strip_info->magic != STRIP_MAGIC | 2265 | if (!strip_info || strip_info->magic != STRIP_MAGIC |
@@ -2455,8 +2453,7 @@ static int strip_close_low(struct net_device *dev) | |||
2455 | 2453 | ||
2456 | if (strip_info->tty == NULL) | 2454 | if (strip_info->tty == NULL) |
2457 | return -EBUSY; | 2455 | return -EBUSY; |
2458 | strip_info->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP); | 2456 | clear_bit(TTY_DO_WRITE_WAKEUP, &strip_info->tty->flags); |
2459 | |||
2460 | netif_stop_queue(dev); | 2457 | netif_stop_queue(dev); |
2461 | 2458 | ||
2462 | /* | 2459 | /* |
@@ -2490,7 +2487,6 @@ static void strip_dev_setup(struct net_device *dev) | |||
2490 | */ | 2487 | */ |
2491 | 2488 | ||
2492 | dev->trans_start = 0; | 2489 | dev->trans_start = 0; |
2493 | dev->last_rx = 0; | ||
2494 | dev->tx_queue_len = 30; /* Drop after 30 frames queued */ | 2490 | dev->tx_queue_len = 30; /* Drop after 30 frames queued */ |
2495 | 2491 | ||
2496 | dev->flags = 0; | 2492 | dev->flags = 0; |
@@ -2498,7 +2494,7 @@ static void strip_dev_setup(struct net_device *dev) | |||
2498 | dev->type = ARPHRD_METRICOM; /* dtang */ | 2494 | dev->type = ARPHRD_METRICOM; /* dtang */ |
2499 | dev->hard_header_len = sizeof(STRIP_Header); | 2495 | dev->hard_header_len = sizeof(STRIP_Header); |
2500 | /* | 2496 | /* |
2501 | * dev->priv Already holds a pointer to our struct strip | 2497 | * netdev_priv(dev) Already holds a pointer to our struct strip |
2502 | */ | 2498 | */ |
2503 | 2499 | ||
2504 | *(MetricomAddress *) & dev->broadcast = broadcast_address; | 2500 | *(MetricomAddress *) & dev->broadcast = broadcast_address; |
@@ -2598,7 +2594,7 @@ static struct strip *strip_alloc(void) | |||
2598 | 2594 | ||
2599 | static int strip_open(struct tty_struct *tty) | 2595 | static int strip_open(struct tty_struct *tty) |
2600 | { | 2596 | { |
2601 | struct strip *strip_info = (struct strip *) tty->disc_data; | 2597 | struct strip *strip_info = tty->disc_data; |
2602 | 2598 | ||
2603 | /* | 2599 | /* |
2604 | * First make sure we're not already connected. | 2600 | * First make sure we're not already connected. |
@@ -2669,7 +2665,7 @@ static int strip_open(struct tty_struct *tty) | |||
2669 | 2665 | ||
2670 | static void strip_close(struct tty_struct *tty) | 2666 | static void strip_close(struct tty_struct *tty) |
2671 | { | 2667 | { |
2672 | struct strip *strip_info = (struct strip *) tty->disc_data; | 2668 | struct strip *strip_info = tty->disc_data; |
2673 | 2669 | ||
2674 | /* | 2670 | /* |
2675 | * First make sure we're connected. | 2671 | * First make sure we're connected. |
@@ -2695,7 +2691,7 @@ static void strip_close(struct tty_struct *tty) | |||
2695 | static int strip_ioctl(struct tty_struct *tty, struct file *file, | 2691 | static int strip_ioctl(struct tty_struct *tty, struct file *file, |
2696 | unsigned int cmd, unsigned long arg) | 2692 | unsigned int cmd, unsigned long arg) |
2697 | { | 2693 | { |
2698 | struct strip *strip_info = (struct strip *) tty->disc_data; | 2694 | struct strip *strip_info = tty->disc_data; |
2699 | 2695 | ||
2700 | /* | 2696 | /* |
2701 | * First make sure we're connected. | 2697 | * First make sure we're connected. |