aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixp2000/ixpdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixp2000/ixpdev.c')
-rw-r--r--drivers/net/ixp2000/ixpdev.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c
index d3bf2f017cc2..2a0174b62e96 100644
--- a/drivers/net/ixp2000/ixpdev.c
+++ b/drivers/net/ixp2000/ixpdev.c
@@ -270,6 +270,18 @@ static int ixpdev_close(struct net_device *dev)
270 return 0; 270 return 0;
271} 271}
272 272
273static const struct net_device_ops ixpdev_netdev_ops = {
274 .ndo_open = ixpdev_open,
275 .ndo_stop = ixpdev_close,
276 .ndo_start_xmit = ixpdev_xmit,
277 .ndo_change_mtu = eth_change_mtu,
278 .ndo_validate_addr = eth_validate_addr,
279 .ndo_set_mac_address = eth_mac_addr,
280#ifdef CONFIG_NET_POLL_CONTROLLER
281 .ndo_poll_controller = ixpdev_poll_controller,
282#endif
283};
284
273struct net_device *ixpdev_alloc(int channel, int sizeof_priv) 285struct net_device *ixpdev_alloc(int channel, int sizeof_priv)
274{ 286{
275 struct net_device *dev; 287 struct net_device *dev;
@@ -279,12 +291,7 @@ struct net_device *ixpdev_alloc(int channel, int sizeof_priv)
279 if (dev == NULL) 291 if (dev == NULL)
280 return NULL; 292 return NULL;
281 293
282 dev->hard_start_xmit = ixpdev_xmit; 294 dev->netdev_ops = &ixpdev_netdev_ops;
283 dev->open = ixpdev_open;
284 dev->stop = ixpdev_close;
285#ifdef CONFIG_NET_POLL_CONTROLLER
286 dev->poll_controller = ixpdev_poll_controller;
287#endif
288 295
289 dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; 296 dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
290 297