diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-15 08:52:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-16 05:20:13 -0400 |
commit | e7090e347ad8bce0de35f9fe2b95e22e4ae8fbab (patch) | |
tree | 36ba6569ce4253d180feac1f68af37e7b67bd521 /drivers/net | |
parent | c2775360e82760be3ad7339a7a1442c45c35b395 (diff) |
ixp2000/ixpdev: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ixp2000/ixpdev.c | 19 |
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 | ||
273 | static 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 | |||
273 | struct net_device *ixpdev_alloc(int channel, int sizeof_priv) | 285 | struct 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 | ||