Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9c49a65 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

bnxt: implement ndo_get_devlink_port



In order for devlink compat functions to work, implement
ndo_get_devlink_port. Legacy slaves does not have devlink port instances
created for themselves.

Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 14c03ac4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -10083,6 +10083,13 @@ int bnxt_get_port_parent_id(struct net_device *dev,
	return 0;
}

static struct devlink_port *bnxt_get_devlink_port(struct net_device *dev)
{
	struct bnxt *bp = netdev_priv(dev);

	return &bp->dl_port;
}

static const struct net_device_ops bnxt_netdev_ops = {
	.ndo_open		= bnxt_open,
	.ndo_start_xmit		= bnxt_start_xmit,
@@ -10115,7 +10122,8 @@ static const struct net_device_ops bnxt_netdev_ops = {
	.ndo_bridge_getlink	= bnxt_bridge_getlink,
	.ndo_bridge_setlink	= bnxt_bridge_setlink,
	.ndo_get_port_parent_id	= bnxt_get_port_parent_id,
	.ndo_get_phys_port_name = bnxt_get_phys_port_name
	.ndo_get_phys_port_name = bnxt_get_phys_port_name,
	.ndo_get_devlink_port	= bnxt_get_devlink_port,
};

static void bnxt_remove_one(struct pci_dev *pdev)