aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/defxx.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 20:31:40 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-20 20:31:40 -0800
commitfd8f4997e35f2c9a8bfc4d797ec09a6ae7858e04 (patch)
treea6b07751715805d43d3bf7c42c92a3e408b41f0d /drivers/net/defxx.c
parent145186a39570244aead77dc2efc559e5cac90548 (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.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c
index 6e6583b609f..a430e3736c1 100644
--- a/drivers/net/defxx.c
+++ b/drivers/net/defxx.c
@@ -477,6 +477,15 @@ static void dfx_get_bars(struct device *bdev,
}
}
+static const struct net_device_ops dfx_netdev_ops = {
+ .ndo_open = dfx_open,
+ .ndo_stop = dfx_close,
+ .ndo_start_xmit = dfx_xmt_queue_pkt,
+ .ndo_get_stats = dfx_ctl_get_stats,
+ .ndo_set_multicast_list = dfx_ctl_set_multicast_list,
+ .ndo_set_mac_address = dfx_ctl_set_mac_address,
+};
+
/*
* ================
* = dfx_register =
@@ -573,13 +582,7 @@ static int __devinit dfx_register(struct device *bdev)
}
/* Initialize new device structure */
-
- dev->get_stats = dfx_ctl_get_stats;
- dev->open = dfx_open;
- dev->stop = dfx_close;
- dev->hard_start_xmit = dfx_xmt_queue_pkt;
- dev->set_multicast_list = dfx_ctl_set_multicast_list;
- dev->set_mac_address = dfx_ctl_set_mac_address;
+ dev->netdev_ops = &dfx_netdev_ops;
if (dfx_bus_pci)
pci_set_master(to_pci_dev(bdev));