aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-04-03 14:24:21 +0200
committerDavid S. Miller <davem@davemloft.net>2019-04-04 17:42:36 -0700
commit6605a226781eb1224c2dcf974a39eea11862b864 (patch)
tree7ee80360f85e1961d017f6949d8c4e7ddf2a00c0 /drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
parentbnxt: move bp->switch_id initialization to PF probe (diff)
downloadlinux-dev-6605a226781eb1224c2dcf974a39eea11862b864.tar.xz
linux-dev-6605a226781eb1224c2dcf974a39eea11862b864.zip
bnxt: pass switch ID through devlink_port_attrs_set()
Pass the switch ID down the to devlink through devlink_port_attrs_set() so it can be used by devlink_compat_switch_id_get(). Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 36ec4cb45276..549c90d3e465 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -230,7 +230,8 @@ int bnxt_dl_register(struct bnxt *bp)
}
devlink_port_attrs_set(&bp->dl_port, DEVLINK_PORT_FLAVOUR_PHYSICAL,
- bp->pf.port_id, false, 0, NULL, 0);
+ bp->pf.port_id, false, 0,
+ bp->switch_id, sizeof(bp->switch_id));
rc = devlink_port_register(dl, &bp->dl_port, bp->pf.port_id);
if (rc) {
netdev_err(bp->dev, "devlink_port_register failed");