aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-12-04 01:10:10 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-04 01:10:10 -0500
commit5618f0d1193d6b051da9b59b0e32ad24397f06a4 (patch)
treedd2f8a354650e03edd5abeee31cf655a09e9aaee
parentb6114794a1c394534659f4a17420e48cf23aa922 (diff)
hydra: convert to net_device_ops
Another device using 8390 library that needs converting. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/Makefile2
-rw-r--r--drivers/net/hydra.c23
2 files changed, 18 insertions, 7 deletions
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index a1fc8a1b50da..1a758dc4394e 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -202,7 +202,7 @@ obj-$(CONFIG_SGI_IOC3_ETH) += ioc3-eth.o
202obj-$(CONFIG_DECLANCE) += declance.o 202obj-$(CONFIG_DECLANCE) += declance.o
203obj-$(CONFIG_ATARILANCE) += atarilance.o 203obj-$(CONFIG_ATARILANCE) += atarilance.o
204obj-$(CONFIG_A2065) += a2065.o 204obj-$(CONFIG_A2065) += a2065.o
205obj-$(CONFIG_HYDRA) += hydra.o 205obj-$(CONFIG_HYDRA) += hydra.o 8390.o
206obj-$(CONFIG_ARIADNE) += ariadne.o 206obj-$(CONFIG_ARIADNE) += ariadne.o
207obj-$(CONFIG_CS89x0) += cs89x0.o 207obj-$(CONFIG_CS89x0) += cs89x0.o
208obj-$(CONFIG_MACSONIC) += macsonic.o 208obj-$(CONFIG_MACSONIC) += macsonic.o
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c
index b0ae0766ea4e..b9198023f628 100644
--- a/drivers/net/hydra.c
+++ b/drivers/net/hydra.c
@@ -94,6 +94,21 @@ static int __devinit hydra_init_one(struct zorro_dev *z,
94 return 0; 94 return 0;
95} 95}
96 96
97static const struct net_device_ops etherh_netdev_ops = {
98 .ndo_open = hydra_open,
99 .ndo_stop = hydra_close,
100
101 .ndo_start_xmit = ei_start_xmit,
102 .ndo_tx_timeout = ei_tx_timeout,
103 .ndo_get_stats = ei_get_stats,
104 .ndo_set_multicast_list = ei_set_multicast_list,
105 .ndo_validate_addr = eth_validate_addr,
106 .ndo_change_mtu = eth_change_mtu,
107#ifdef CONFIG_NET_POLL_CONTROLLER
108 .ndo_poll_controller = ei_poll,
109#endif
110};
111
97static int __devinit hydra_init(struct zorro_dev *z) 112static int __devinit hydra_init(struct zorro_dev *z)
98{ 113{
99 struct net_device *dev; 114 struct net_device *dev;
@@ -109,7 +124,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
109 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 124 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
110 }; 125 };
111 126
112 dev = ____alloc_ei_netdev(0); 127 dev = alloc_ei_netdev();
113 if (!dev) 128 if (!dev)
114 return -ENOMEM; 129 return -ENOMEM;
115 130
@@ -144,12 +159,8 @@ static int __devinit hydra_init(struct zorro_dev *z)
144 ei_status.block_output = &hydra_block_output; 159 ei_status.block_output = &hydra_block_output;
145 ei_status.get_8390_hdr = &hydra_get_8390_hdr; 160 ei_status.get_8390_hdr = &hydra_get_8390_hdr;
146 ei_status.reg_offset = hydra_offsets; 161 ei_status.reg_offset = hydra_offsets;
147 dev->open = &hydra_open;
148 dev->stop = &hydra_close;
149#ifdef CONFIG_NET_POLL_CONTROLLER
150 dev->poll_controller = __ei_poll;
151#endif
152 162
163 dev->netdev_ops = &hydra_netdev_ops;
153 __NS8390_init(dev, 0); 164 __NS8390_init(dev, 0);
154 165
155 err = register_netdev(dev); 166 err = register_netdev(dev);