aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hp-plus.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-25 21:22:42 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 21:22:42 -0500
commitd4a97d425c2f59849ebdcc94281ecf108818efbf (patch)
treeddc3cd59fa3f382ac7943dd610c07341ca0fcfb2 /drivers/net/hp-plus.c
parent458228bc4c1370de1dae4ba0f78469092ca21d75 (diff)
hp-plus: convert to net_device_ops
Another driver converted to new infrastructure. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hp-plus.c')
-rw-r--r--drivers/net/hp-plus.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c
index 9026fd6ea0ff..c34411cba6b4 100644
--- a/drivers/net/hp-plus.c
+++ b/drivers/net/hp-plus.c
@@ -158,6 +158,21 @@ out:
158} 158}
159#endif 159#endif
160 160
161static const struct net_device_ops hpp_netdev_ops = {
162 .ndo_open = hpp_open,
163 .ndo_stop = hpp_close,
164 .ndo_start_xmit = ei_start_xmit,
165 .ndo_tx_timeout = ei_tx_timeout,
166 .ndo_get_stats = ei_get_stats,
167 .ndo_set_multicast_list = ei_set_multicast_list,
168 .ndo_validate_addr = eth_validate_addr,
169 .ndo_change_mtu = eth_change_mtu,
170#ifdef CONFIG_NET_POLL_CONTROLLER
171 .ndo_poll_controller = ei_poll,
172#endif
173};
174
175
161/* Do the interesting part of the probe at a single address. */ 176/* Do the interesting part of the probe at a single address. */
162static int __init hpp_probe1(struct net_device *dev, int ioaddr) 177static int __init hpp_probe1(struct net_device *dev, int ioaddr)
163{ 178{
@@ -226,11 +241,7 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
226 /* Set the base address to point to the NIC, not the "real" base! */ 241 /* Set the base address to point to the NIC, not the "real" base! */
227 dev->base_addr = ioaddr + NIC_OFFSET; 242 dev->base_addr = ioaddr + NIC_OFFSET;
228 243
229 dev->open = &hpp_open; 244 dev->netdev_ops = &hpp_netdev_ops;
230 dev->stop = &hpp_close;
231#ifdef CONFIG_NET_POLL_CONTROLLER
232 dev->poll_controller = ei_poll;
233#endif
234 245
235 ei_status.name = name; 246 ei_status.name = name;
236 ei_status.word16 = 0; /* Agggghhhhh! Debug time: 2 days! */ 247 ei_status.word16 = 0; /* Agggghhhhh! Debug time: 2 days! */
@@ -301,8 +312,7 @@ hpp_open(struct net_device *dev)
301 /* Select the operational page. */ 312 /* Select the operational page. */
302 outw(Perf_Page, ioaddr + HP_PAGING); 313 outw(Perf_Page, ioaddr + HP_PAGING);
303 314
304 eip_open(dev); 315 return eip_open(dev);
305 return 0;
306} 316}
307 317
308static int 318static int