diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-12-02 18:00:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-02 18:00:28 -0500 |
commit | ca17584bf2ad1b1e37a5c0e4386728cc5fc9dabc (patch) | |
tree | 12b894204f9ed2b925f370da60003e3c641c12bb /drivers/net | |
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')
-rw-r--r-- | drivers/net/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/mac8390.c | 22 |
2 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 5f3baca3620d..f664e8ddfd40 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile | |||
@@ -97,7 +97,7 @@ obj-$(CONFIG_HAMACHI) += hamachi.o | |||
97 | obj-$(CONFIG_NET) += Space.o loopback.o | 97 | obj-$(CONFIG_NET) += Space.o loopback.o |
98 | obj-$(CONFIG_SEEQ8005) += seeq8005.o | 98 | obj-$(CONFIG_SEEQ8005) += seeq8005.o |
99 | obj-$(CONFIG_NET_SB1000) += sb1000.o | 99 | obj-$(CONFIG_NET_SB1000) += sb1000.o |
100 | obj-$(CONFIG_MAC8390) += mac8390.o | 100 | obj-$(CONFIG_MAC8390) += mac8390.o 8390.o |
101 | obj-$(CONFIG_APNE) += apne.o 8390.o | 101 | obj-$(CONFIG_APNE) += apne.o 8390.o |
102 | obj-$(CONFIG_PCMCIA_PCNET) += 8390.o | 102 | obj-$(CONFIG_PCMCIA_PCNET) += 8390.o |
103 | obj-$(CONFIG_HP100) += hp100.o | 103 | obj-$(CONFIG_HP100) += hp100.o |
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) | |||
304 | if (!MACH_IS_MAC) | 304 | if (!MACH_IS_MAC) |
305 | return ERR_PTR(-ENODEV); | 305 | return ERR_PTR(-ENODEV); |
306 | 306 | ||
307 | dev = ____alloc_ei_netdev(0); | 307 | dev = alloc_ei_netdev(); |
308 | if (!dev) | 308 | if (!dev) |
309 | return ERR_PTR(-ENOMEM); | 309 | return ERR_PTR(-ENOMEM); |
310 | 310 | ||
@@ -478,6 +478,20 @@ void cleanup_module(void) | |||
478 | 478 | ||
479 | #endif /* MODULE */ | 479 | #endif /* MODULE */ |
480 | 480 | ||
481 | static const struct net_device_ops mac8390_netdev_ops = { | ||
482 | .ndo_open = mac8390_open, | ||
483 | .ndo_stop = mac8390_close, | ||
484 | .ndo_start_xmit = ei_start_xmit, | ||
485 | .ndo_tx_timeout = ei_tx_timeout, | ||
486 | .ndo_get_stats = ei_get_stats, | ||
487 | .ndo_set_multicast_list = ei_set_multicast_list, | ||
488 | .ndo_validate_addr = eth_validate_addr, | ||
489 | .ndo_change_mtu = eth_change_mtu, | ||
490 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
491 | .ndo_poll_controller = ei_poll, | ||
492 | #endif | ||
493 | }; | ||
494 | |||
481 | static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev, | 495 | static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * ndev, |
482 | enum mac8390_type type) | 496 | enum mac8390_type type) |
483 | { | 497 | { |
@@ -503,11 +517,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd | |||
503 | int access_bitmode = 0; | 517 | int access_bitmode = 0; |
504 | 518 | ||
505 | /* Now fill in our stuff */ | 519 | /* Now fill in our stuff */ |
506 | dev->open = &mac8390_open; | 520 | dev->netdev_ops = &mac8390_netdev_ops; |
507 | dev->stop = &mac8390_close; | ||
508 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
509 | dev->poll_controller = __ei_poll; | ||
510 | #endif | ||
511 | 521 | ||
512 | /* GAR, ei_status is actually a macro even though it looks global */ | 522 | /* GAR, ei_status is actually a macro even though it looks global */ |
513 | ei_status.name = cardname[type]; | 523 | ei_status.name = cardname[type]; |