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 | |
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')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 18 | ||||
-rw-r--r-- | drivers/char/synclink.c | 18 | ||||
-rw-r--r-- | drivers/char/synclink_gt.c | 18 | ||||
-rw-r--r-- | drivers/char/synclinkmp.c | 18 |
4 files changed, 44 insertions, 28 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) | |||
4311 | dev->stats.rx_bytes += size; | 4311 | dev->stats.rx_bytes += size; |
4312 | 4312 | ||
4313 | netif_rx(skb); | 4313 | netif_rx(skb); |
4314 | |||
4315 | dev->last_rx = jiffies; | ||
4316 | } | 4314 | } |
4317 | 4315 | ||
4316 | static const struct net_device_ops hdlcdev_ops = { | ||
4317 | .ndo_open = hdlcdev_open, | ||
4318 | .ndo_stop = hdlcdev_close, | ||
4319 | .ndo_change_mtu = hdlc_change_mtu, | ||
4320 | .ndo_start_xmit = hdlc_start_xmit, | ||
4321 | .ndo_do_ioctl = hdlcdev_ioctl, | ||
4322 | .ndo_tx_timeout = hdlcdev_tx_timeout, | ||
4323 | }; | ||
4324 | |||
4318 | /** | 4325 | /** |
4319 | * called by device driver when adding device instance | 4326 | * called by device driver when adding device instance |
4320 | * do generic HDLC initialization | 4327 | * do generic HDLC initialization |
@@ -4341,11 +4348,8 @@ static int hdlcdev_init(MGSLPC_INFO *info) | |||
4341 | dev->irq = info->irq_level; | 4348 | dev->irq = info->irq_level; |
4342 | 4349 | ||
4343 | /* network layer callbacks and settings */ | 4350 | /* network layer callbacks and settings */ |
4344 | dev->do_ioctl = hdlcdev_ioctl; | 4351 | dev->netdev_ops = &hdlcdev_ops; |
4345 | dev->open = hdlcdev_open; | 4352 | dev->watchdog_timeo = 10 * HZ; |
4346 | dev->stop = hdlcdev_close; | ||
4347 | dev->tx_timeout = hdlcdev_tx_timeout; | ||
4348 | dev->watchdog_timeo = 10*HZ; | ||
4349 | dev->tx_queue_len = 50; | 4353 | dev->tx_queue_len = 50; |
4350 | 4354 | ||
4351 | /* generic HDLC layer callbacks and settings */ | 4355 | /* generic HDLC layer callbacks and settings */ |
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 */ |
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 | ||
1768 | static 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 */ |
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 7b0c5b2dd263..8eb6c89a980e 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -1907,10 +1907,17 @@ static void hdlcdev_rx(SLMP_INFO *info, char *buf, int size) | |||
1907 | dev->stats.rx_bytes += size; | 1907 | dev->stats.rx_bytes += size; |
1908 | 1908 | ||
1909 | netif_rx(skb); | 1909 | netif_rx(skb); |
1910 | |||
1911 | dev->last_rx = jiffies; | ||
1912 | } | 1910 | } |
1913 | 1911 | ||
1912 | static const struct net_device_ops hdlcdev_ops = { | ||
1913 | .ndo_open = hdlcdev_open, | ||
1914 | .ndo_stop = hdlcdev_close, | ||
1915 | .ndo_change_mtu = hdlc_change_mtu, | ||
1916 | .ndo_start_xmit = hdlc_start_xmit, | ||
1917 | .ndo_do_ioctl = hdlcdev_ioctl, | ||
1918 | .ndo_tx_timeout = hdlcdev_tx_timeout, | ||
1919 | }; | ||
1920 | |||
1914 | /** | 1921 | /** |
1915 | * called by device driver when adding device instance | 1922 | * called by device driver when adding device instance |
1916 | * do generic HDLC initialization | 1923 | * do generic HDLC initialization |
@@ -1938,11 +1945,8 @@ static int hdlcdev_init(SLMP_INFO *info) | |||
1938 | dev->irq = info->irq_level; | 1945 | dev->irq = info->irq_level; |
1939 | 1946 | ||
1940 | /* network layer callbacks and settings */ | 1947 | /* network layer callbacks and settings */ |
1941 | dev->do_ioctl = hdlcdev_ioctl; | 1948 | dev->netdev_ops = &hdlcdev_ops; |
1942 | dev->open = hdlcdev_open; | 1949 | dev->watchdog_timeo = 10 * HZ; |
1943 | dev->stop = hdlcdev_close; | ||
1944 | dev->tx_timeout = hdlcdev_tx_timeout; | ||
1945 | dev->watchdog_timeo = 10*HZ; | ||
1946 | dev->tx_queue_len = 50; | 1950 | dev->tx_queue_len = 50; |
1947 | 1951 | ||
1948 | /* generic HDLC layer callbacks and settings */ | 1952 | /* generic HDLC layer callbacks and settings */ |