diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-01-07 21:09:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-07 21:09:36 -0500 |
commit | b1da683d17972fc851c46331a5efa801bddf9273 (patch) | |
tree | 4080fcb5f1b95fdb649e780427488584a1b85540 /drivers/net/slip.c | |
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>
Diffstat (limited to 'drivers/net/slip.c')
-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 8e1c0baf6958..5c61d5fad908 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c | |||
@@ -603,7 +603,6 @@ static int sl_init(struct net_device *dev) | |||
603 | dev->mtu = sl->mtu; | 603 | dev->mtu = sl->mtu; |
604 | dev->type = ARPHRD_SLIP + sl->mode; | 604 | dev->type = ARPHRD_SLIP + sl->mode; |
605 | #ifdef SL_CHECK_TRANSMIT | 605 | #ifdef SL_CHECK_TRANSMIT |
606 | dev->tx_timeout = sl_tx_timeout; | ||
607 | dev->watchdog_timeo = 20*HZ; | 606 | dev->watchdog_timeo = 20*HZ; |
608 | #endif | 607 | #endif |
609 | return 0; | 608 | return 0; |
@@ -617,19 +616,26 @@ static void sl_uninit(struct net_device *dev) | |||
617 | sl_free_bufs(sl); | 616 | sl_free_bufs(sl); |
618 | } | 617 | } |
619 | 618 | ||
619 | static const struct net_device_ops sl_netdev_ops = { | ||
620 | .ndo_init = sl_init, | ||
621 | .ndo_uninit = sl_uninit, | ||
622 | .ndo_open = sl_open, | ||
623 | .ndo_stop = sl_close, | ||
624 | .ndo_start_xmit = sl_xmit, | ||
625 | .ndo_get_stats = sl_get_stats, | ||
626 | .ndo_change_mtu = sl_change_mtu, | ||
627 | .ndo_tx_timeout = sl_tx_timeout, | ||
628 | #ifdef CONFIG_SLIP_SMART | ||
629 | .ndo_do_ioctl = sl_ioctl, | ||
630 | #endif | ||
631 | }; | ||
632 | |||
633 | |||
620 | static void sl_setup(struct net_device *dev) | 634 | static void sl_setup(struct net_device *dev) |
621 | { | 635 | { |
622 | dev->init = sl_init; | 636 | dev->netdev_ops = &sl_netdev_ops; |
623 | dev->uninit = sl_uninit; | ||
624 | dev->open = sl_open; | ||
625 | dev->destructor = free_netdev; | 637 | dev->destructor = free_netdev; |
626 | dev->stop = sl_close; | 638 | |
627 | dev->get_stats = sl_get_stats; | ||
628 | dev->change_mtu = sl_change_mtu; | ||
629 | dev->hard_start_xmit = sl_xmit; | ||
630 | #ifdef CONFIG_SLIP_SMART | ||
631 | dev->do_ioctl = sl_ioctl; | ||
632 | #endif | ||
633 | dev->hard_header_len = 0; | 639 | dev->hard_header_len = 0; |
634 | dev->addr_len = 0; | 640 | dev->addr_len = 0; |
635 | dev->tx_queue_len = 10; | 641 | dev->tx_queue_len = 10; |