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/net/wan/sealevel.c | |
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/net/wan/sealevel.c')
-rw-r--r-- | drivers/net/wan/sealevel.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 0941a26f6e3f..23b269027453 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c | |||
@@ -169,6 +169,14 @@ static int sealevel_attach(struct net_device *dev, unsigned short encoding, | |||
169 | return -EINVAL; | 169 | return -EINVAL; |
170 | } | 170 | } |
171 | 171 | ||
172 | static const struct net_device_ops sealevel_ops = { | ||
173 | .ndo_open = sealevel_open, | ||
174 | .ndo_stop = sealevel_close, | ||
175 | .ndo_change_mtu = hdlc_change_mtu, | ||
176 | .ndo_start_xmit = hdlc_start_xmit, | ||
177 | .ndo_do_ioctl = sealevel_ioctl, | ||
178 | }; | ||
179 | |||
172 | static int slvl_setup(struct slvl_device *sv, int iobase, int irq) | 180 | static int slvl_setup(struct slvl_device *sv, int iobase, int irq) |
173 | { | 181 | { |
174 | struct net_device *dev = alloc_hdlcdev(sv); | 182 | struct net_device *dev = alloc_hdlcdev(sv); |
@@ -177,9 +185,7 @@ static int slvl_setup(struct slvl_device *sv, int iobase, int irq) | |||
177 | 185 | ||
178 | dev_to_hdlc(dev)->attach = sealevel_attach; | 186 | dev_to_hdlc(dev)->attach = sealevel_attach; |
179 | dev_to_hdlc(dev)->xmit = sealevel_queue_xmit; | 187 | dev_to_hdlc(dev)->xmit = sealevel_queue_xmit; |
180 | dev->open = sealevel_open; | 188 | dev->netdev_ops = &sealevel_ops; |
181 | dev->stop = sealevel_close; | ||
182 | dev->do_ioctl = sealevel_ioctl; | ||
183 | dev->base_addr = iobase; | 189 | dev->base_addr = iobase; |
184 | dev->irq = irq; | 190 | dev->irq = irq; |
185 | 191 | ||