mirror of https://gitee.com/openkylin/linux.git
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: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
14c03ac4c1
commit
c9c49a65e5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue