diff options
author | Krzysztof Hałasa <khc@pm.waw.pl> | 2009-01-08 22:52:11 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 14:03:37 -0800 |
commit | 991990a12de42281f81b4e3a6471586d2d0caf6a (patch) | |
tree | 7b7ad34cf8218dab2ddd882a87b7c7a687b7d2ee /drivers/char/pcmcia | |
parent | dff3fde7be8f08c78914fca3d25e1cffe7625faa (diff) | |
download | blackbird-op-linux-991990a12de42281f81b4e3a6471586d2d0caf6a.tar.gz blackbird-op-linux-991990a12de42281f81b4e3a6471586d2d0caf6a.zip |
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/pcmcia')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index dc073e167abc..5608a1e5a3b3 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -4311,10 +4311,17 @@ static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size) dev->stats.rx_bytes += size; netif_rx(skb); - - dev->last_rx = jiffies; } +static const struct net_device_ops hdlcdev_ops = { + .ndo_open = hdlcdev_open, + .ndo_stop = hdlcdev_close, + .ndo_change_mtu = hdlc_change_mtu, + .ndo_start_xmit = hdlc_start_xmit, + .ndo_do_ioctl = hdlcdev_ioctl, + .ndo_tx_timeout = hdlcdev_tx_timeout, +}; + /** * called by device driver when adding device instance * do generic HDLC initialization @@ -4341,11 +4348,8 @@ static int hdlcdev_init(MGSLPC_INFO *info) dev->irq = info->irq_level; /* network layer callbacks and settings */ - dev->do_ioctl = hdlcdev_ioctl; - dev->open = hdlcdev_open; - dev->stop = hdlcdev_close; - dev->tx_timeout = hdlcdev_tx_timeout; - dev->watchdog_timeo = 10*HZ; + dev->netdev_ops = &hdlcdev_ops; + dev->watchdog_timeo = 10 * HZ; dev->tx_queue_len = 50; /* generic HDLC layer callbacks and settings */ |