Skip to content

Commit a33a2bb

Browse files
alexb0davem330
authored andcommitted
rionet: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1ec847f commit a33a2bb

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎drivers/net/rionet.c‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,15 @@ static const struct ethtool_ops rionet_ethtool_ops = {
428428
.get_link = ethtool_op_get_link,
429429
};
430430

431+
static 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+
431440
static int rionet_setup_netdev(struct rio_mport *mport)
432441
{
433442
int rc = 0;
@@ -466,10 +475,7 @@ static int rionet_setup_netdev(struct rio_mport *mport)
466475
ndev->dev_addr[4] = device_id >> 8;
467476
ndev->dev_addr[5] = device_id & 0xff;
468477

469-
/* Fill in the driver function table */
470-
ndev->open = &rionet_open;
471-
ndev->hard_start_xmit = &rionet_start_xmit;
472-
ndev->stop = &rionet_close;
478+
ndev->netdev_ops = &rionet_netdev_ops;
473479
ndev->mtu = RIO_MAX_MSG_SIZE - 14;
474480
ndev->features = NETIF_F_LLTX;
475481
SET_ETHTOOL_OPS(ndev, &rionet_ethtool_ops);

0 commit comments

Comments
 (0)