diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-01-07 18:09:36 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-07 18:09:36 -0800 |
commit | b1da683d17972fc851c46331a5efa801bddf9273 (patch) | |
tree | 4080fcb5f1b95fdb649e780427488584a1b85540 | |
parent | c4a80d7e67b1a084e061853d39a1ba6f500027fd (diff) |
slip: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/slip.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/slip.c b/drivers/net/slip.c index 8e1c0baf695..5c61d5fad90 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -603,7 +603,6 @@ static int sl_init(struct net_device *dev) dev->mtu = sl->mtu; dev->type = ARPHRD_SLIP + sl->mode; #ifdef SL_CHECK_TRANSMIT - dev->tx_timeout = sl_tx_timeout; dev->watchdog_timeo = 20*HZ; #endif return 0; @@ -617,19 +616,26 @@ static void sl_uninit(struct net_device *dev) sl_free_bufs(sl); } +static const struct net_device_ops sl_netdev_ops = { + .ndo_init = sl_init, + .ndo_uninit = sl_uninit, + .ndo_open = sl_open, + .ndo_stop = sl_close, + .ndo_start_xmit = sl_xmit, + .ndo_get_stats = sl_get_stats, + .ndo_change_mtu = sl_change_mtu, + .ndo_tx_timeout = sl_tx_timeout, +#ifdef CONFIG_SLIP_SMART + .ndo_do_ioctl = sl_ioctl, +#endif +}; + + static void sl_setup(struct net_device *dev) { - dev->init = sl_init; - dev->uninit = sl_uninit; - dev->open = sl_open; + dev->netdev_ops = &sl_netdev_ops; dev->destructor = free_netdev; - dev->stop = sl_close; - dev->get_stats = sl_get_stats; - dev->change_mtu = sl_change_mtu; - dev->hard_start_xmit = sl_xmit; -#ifdef CONFIG_SLIP_SMART - dev->do_ioctl = sl_ioctl; -#endif + dev->hard_header_len = 0; dev->addr_len = 0; dev->tx_queue_len = 10; |