aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclink_gt.c
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2009-01-08 16:52:11 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:03:37 -0500
commit991990a12de42281f81b4e3a6471586d2d0caf6a (patch)
tree7b7ad34cf8218dab2ddd882a87b7c7a687b7d2ee /drivers/char/synclink_gt.c
parentdff3fde7be8f08c78914fca3d25e1cffe7625faa (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_gt.c')
-rw-r--r--drivers/char/synclink_gt.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index f329f459817c..efb3dc928a43 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -1763,10 +1763,17 @@ static void hdlcdev_rx(struct slgt_info *info, char *buf, int size)
1763 dev->stats.rx_bytes += size; 1763 dev->stats.rx_bytes += size;
1764 1764
1765 netif_rx(skb); 1765 netif_rx(skb);
1766
1767 dev->last_rx = jiffies;
1768} 1766}
1769 1767
1768static const struct net_device_ops hdlcdev_ops = {
1769 .ndo_open = hdlcdev_open,
1770 .ndo_stop = hdlcdev_close,
1771 .ndo_change_mtu = hdlc_change_mtu,
1772 .ndo_start_xmit = hdlc_start_xmit,
1773 .ndo_do_ioctl = hdlcdev_ioctl,
1774 .ndo_tx_timeout = hdlcdev_tx_timeout,
1775};
1776
1770/** 1777/**
1771 * called by device driver when adding device instance 1778 * called by device driver when adding device instance
1772 * do generic HDLC initialization 1779 * do generic HDLC initialization
@@ -1794,11 +1801,8 @@ static int hdlcdev_init(struct slgt_info *info)
1794 dev->irq = info->irq_level; 1801 dev->irq = info->irq_level;
1795 1802
1796 /* network layer callbacks and settings */ 1803 /* network layer callbacks and settings */
1797 dev->do_ioctl = hdlcdev_ioctl; 1804 dev->netdev_ops = &hdlcdev_ops;
1798 dev->open = hdlcdev_open; 1805 dev->watchdog_timeo = 10 * HZ;
1799 dev->stop = hdlcdev_close;
1800 dev->tx_timeout = hdlcdev_tx_timeout;
1801 dev->watchdog_timeo = 10*HZ;
1802 dev->tx_queue_len = 50; 1806 dev->tx_queue_len = 50;
1803 1807
1804 /* generic HDLC layer callbacks and settings */ 1808 /* generic HDLC layer callbacks and settings */