diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2009-01-08 16:52:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:03:37 -0500 |
commit | 991990a12de42281f81b4e3a6471586d2d0caf6a (patch) | |
tree | 7b7ad34cf8218dab2ddd882a87b7c7a687b7d2ee /drivers/char/synclink.c | |
parent | dff3fde7be8f08c78914fca3d25e1cffe7625faa (diff) |
WAN: Convert generic HDLC drivers to netdev_ops.
Also remove unneeded last_rx update from Synclink drivers.
Synclink part mostly by Stephen Hemminger.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/char/synclink.c')
-rw-r--r-- | drivers/char/synclink.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c index b8063d4cad32..0057a8f58cb1 100644 --- a/drivers/char/synclink.c +++ b/drivers/char/synclink.c | |||
@@ -8007,10 +8007,17 @@ static void hdlcdev_rx(struct mgsl_struct *info, char *buf, int size) | |||
8007 | dev->stats.rx_bytes += size; | 8007 | dev->stats.rx_bytes += size; |
8008 | 8008 | ||
8009 | netif_rx(skb); | 8009 | netif_rx(skb); |
8010 | |||
8011 | dev->last_rx = jiffies; | ||
8012 | } | 8010 | } |
8013 | 8011 | ||
8012 | static const struct net_device_ops hdlcdev_ops = { | ||
8013 | .ndo_open = hdlcdev_open, | ||
8014 | .ndo_stop = hdlcdev_close, | ||
8015 | .ndo_change_mtu = hdlc_change_mtu, | ||
8016 | .ndo_start_xmit = hdlc_start_xmit, | ||
8017 | .ndo_do_ioctl = hdlcdev_ioctl, | ||
8018 | .ndo_tx_timeout = hdlcdev_tx_timeout, | ||
8019 | }; | ||
8020 | |||
8014 | /** | 8021 | /** |
8015 | * called by device driver when adding device instance | 8022 | * called by device driver when adding device instance |
8016 | * do generic HDLC initialization | 8023 | * do generic HDLC initialization |
@@ -8038,11 +8045,8 @@ static int hdlcdev_init(struct mgsl_struct *info) | |||
8038 | dev->dma = info->dma_level; | 8045 | dev->dma = info->dma_level; |
8039 | 8046 | ||
8040 | /* network layer callbacks and settings */ | 8047 | /* network layer callbacks and settings */ |
8041 | dev->do_ioctl = hdlcdev_ioctl; | 8048 | dev->netdev_ops = &hdlcdev_ops; |
8042 | dev->open = hdlcdev_open; | 8049 | dev->watchdog_timeo = 10 * HZ; |
8043 | dev->stop = hdlcdev_close; | ||
8044 | dev->tx_timeout = hdlcdev_tx_timeout; | ||
8045 | dev->watchdog_timeo = 10*HZ; | ||
8046 | dev->tx_queue_len = 50; | 8050 | dev->tx_queue_len = 50; |
8047 | 8051 | ||
8048 | /* generic HDLC layer callbacks and settings */ | 8052 | /* generic HDLC layer callbacks and settings */ |