diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 23:31:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 23:31:40 -0500 |
commit | fd8f4997e35f2c9a8bfc4d797ec09a6ae7858e04 (patch) | |
tree | a6b07751715805d43d3bf7c42c92a3e408b41f0d /drivers/net/defxx.c | |
parent | 145186a39570244aead77dc2efc559e5cac90548 (diff) |
defxx: convert driver to net_device_ops
Convert this driver 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/defxx.c')
-rw-r--r-- | drivers/net/defxx.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c index 6e6583b609f7..a430e3736c12 100644 --- a/drivers/net/defxx.c +++ b/drivers/net/defxx.c | |||
@@ -477,6 +477,15 @@ static void dfx_get_bars(struct device *bdev, | |||
477 | } | 477 | } |
478 | } | 478 | } |
479 | 479 | ||
480 | static const struct net_device_ops dfx_netdev_ops = { | ||
481 | .ndo_open = dfx_open, | ||
482 | .ndo_stop = dfx_close, | ||
483 | .ndo_start_xmit = dfx_xmt_queue_pkt, | ||
484 | .ndo_get_stats = dfx_ctl_get_stats, | ||
485 | .ndo_set_multicast_list = dfx_ctl_set_multicast_list, | ||
486 | .ndo_set_mac_address = dfx_ctl_set_mac_address, | ||
487 | }; | ||
488 | |||
480 | /* | 489 | /* |
481 | * ================ | 490 | * ================ |
482 | * = dfx_register = | 491 | * = dfx_register = |
@@ -573,13 +582,7 @@ static int __devinit dfx_register(struct device *bdev) | |||
573 | } | 582 | } |
574 | 583 | ||
575 | /* Initialize new device structure */ | 584 | /* Initialize new device structure */ |
576 | 585 | dev->netdev_ops = &dfx_netdev_ops; | |
577 | dev->get_stats = dfx_ctl_get_stats; | ||
578 | dev->open = dfx_open; | ||
579 | dev->stop = dfx_close; | ||
580 | dev->hard_start_xmit = dfx_xmt_queue_pkt; | ||
581 | dev->set_multicast_list = dfx_ctl_set_multicast_list; | ||
582 | dev->set_mac_address = dfx_ctl_set_mac_address; | ||
583 | 586 | ||
584 | if (dfx_bus_pci) | 587 | if (dfx_bus_pci) |
585 | pci_set_master(to_pci_dev(bdev)); | 588 | pci_set_master(to_pci_dev(bdev)); |