diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-12-02 15:00:28 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-02 15:00:28 -0800 |
commit | ca17584bf2ad1b1e37a5c0e4386728cc5fc9dabc (patch) | |
tree | 12b894204f9ed2b925f370da60003e3c641c12bb /drivers/net/mac8390.c | |
parent | b9a9b4b0429d0c0e4655d531a57a6424d972433c (diff) |
mac8390: update to net_device_ops
Another related 8390 driver. Since this is for nubus, not sure if
anyone still has the hardware?
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mac8390.c')
-rw-r--r-- | drivers/net/mac8390.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c index 98e3eb2697c9..57716e22660c 100644 --- a/drivers/net/mac8390.c +++ b/drivers/net/mac8390.c @@ -304,7 +304,7 @@ struct net_device * __init mac8390_probe(int unit) if (!MACH_IS_MAC) return ERR_PTR(-ENODEV); - dev = ____alloc_ei_netdev(0); + dev = alloc_ei_netdev(); if (!dev) return ERR_PTR(-ENOMEM); @@ -478,6 +478,20 @@ void cleanup_module(void) #endif /* MODULE */ +static const struct net_device_ops mac8390_netdev_ops = { + .ndo_open = mac8390_open, + .ndo_stop = mac8390_close, + .ndo_start_xmit = ei_start_xmit, + .ndo_tx_timeout = ei_tx_timeout, + .ndo_get_stats = ei_get_stats, + .ndo_set_multicast_list = ei_set_multicast_list, + .ndo_validate_addr = eth_validate_addr, + .ndo_change_mtu = eth_change_mtu, +#ifdef CONFIG_NET_POLL_CONTROLLER + .ndo_poll_controller = ei_poll, +#endif +}; + static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev, enum mac8390_type type) { @@ -503,11 +517,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd int access_bitmode = 0; /* Now fill in our stuff */ - dev->open = &mac8390_open; - dev->stop = &mac8390_close; -#ifdef CONFIG_NET_POLL_CONTROLLER - dev->poll_controller = __ei_poll; -#endif + dev->netdev_ops = &mac8390_netdev_ops; /* GAR, ei_status is actually a macro even though it looks global */ ei_status.name = cardname[type]; |