aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-03-20 15:36:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-22 01:43:56 -0400
commit7dd0b6e0feca6cd4269e120d63c46eeb63164ca2 (patch)
tree2c688ab60fa31a77633e11fddd42fcbda6a61c97 /drivers/net/wan
parentfe6c6fbbcdd6675244fbbde62a9790ca57bd2785 (diff)
sbni: 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/wan')
-rw-r--r--drivers/net/wan/sbni.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index e3031607eaf6..f4211fe0f445 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -206,15 +206,21 @@ sbni_isa_probe( struct net_device *dev )
206 } 206 }
207} 207}
208 208
209static const struct net_device_ops sbni_netdev_ops = {
210 .ndo_open = sbni_open,
211 .ndo_stop = sbni_close,
212 .ndo_start_xmit = sbni_start_xmit,
213 .ndo_set_multicast_list = set_multicast_list,
214 .ndo_do_ioctl = sbni_ioctl,
215 .ndo_change_mtu = eth_change_mtu,
216 .ndo_set_mac_address = eth_mac_addr,
217 .ndo_validate_addr = eth_validate_addr,
218};
219
209static void __init sbni_devsetup(struct net_device *dev) 220static void __init sbni_devsetup(struct net_device *dev)
210{ 221{
211 ether_setup( dev ); 222 ether_setup( dev );
212 dev->open = &sbni_open; 223 dev->netdev_ops = &sbni_netdev_ops;
213 dev->stop = &sbni_close;
214 dev->hard_start_xmit = &sbni_start_xmit;
215 dev->get_stats = &sbni_get_stats;
216 dev->set_multicast_list = &set_multicast_list;
217 dev->do_ioctl = &sbni_ioctl;
218} 224}
219 225
220int __init sbni_probe(int unit) 226int __init sbni_probe(int unit)
@@ -227,6 +233,8 @@ int __init sbni_probe(int unit)
227 if (!dev) 233 if (!dev)
228 return -ENOMEM; 234 return -ENOMEM;
229 235
236 dev->netdev_ops = &sbni_netdev_ops;
237
230 sprintf(dev->name, "sbni%d", unit); 238 sprintf(dev->name, "sbni%d", unit);
231 netdev_boot_setup_check(dev); 239 netdev_boot_setup_check(dev);
232 240