aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/rionet.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-04-15 08:52:56 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-16 05:20:24 -0400
commita33a2bb3c9f38c79e97f6ed720412d946e894e81 (patch)
tree3b40652eb574a9a48b98dcaba845ba932c1af3ff /drivers/net/rionet.c
parent1ec847f6d46f041bb2ae65efc7b00d122b03d212 (diff)
rionet: 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/rionet.c')
-rw-r--r--drivers/net/rionet.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
index ec59e29807a6..8702e7acdee6 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -428,6 +428,15 @@ static const struct ethtool_ops rionet_ethtool_ops = {
428 .get_link = ethtool_op_get_link, 428 .get_link = ethtool_op_get_link,
429}; 429};
430 430
431static const struct net_device_ops rionet_netdev_ops = {
432 .ndo_open = rionet_open,
433 .ndo_stop = rionet_close,
434 .ndo_start_xmit = rionet_start_xmit,
435 .ndo_change_mtu = eth_change_mtu,
436 .ndo_validate_addr = eth_validate_addr,
437 .ndo_set_mac_address = eth_mac_addr,
438};
439
431static int rionet_setup_netdev(struct rio_mport *mport) 440static int rionet_setup_netdev(struct rio_mport *mport)
432{ 441{
433 int rc = 0; 442 int rc = 0;
@@ -466,10 +475,7 @@ static int rionet_setup_netdev(struct rio_mport *mport)
466 ndev->dev_addr[4] = device_id >> 8; 475 ndev->dev_addr[4] = device_id >> 8;
467 ndev->dev_addr[5] = device_id & 0xff; 476 ndev->dev_addr[5] = device_id & 0xff;
468 477
469 /* Fill in the driver function table */ 478 ndev->netdev_ops = &rionet_netdev_ops;
470 ndev->open = &rionet_open;
471 ndev->hard_start_xmit = &rionet_start_xmit;
472 ndev->stop = &rionet_close;
473 ndev->mtu = RIO_MAX_MSG_SIZE - 14; 479 ndev->mtu = RIO_MAX_MSG_SIZE - 14;
474 ndev->features = NETIF_F_LLTX; 480 ndev->features = NETIF_F_LLTX;
475 SET_ETHTOOL_OPS(ndev, &rionet_ethtool_ops); 481 SET_ETHTOOL_OPS(ndev, &rionet_ethtool_ops);