bnxt: pass switch ID through devlink_port_attrs_set()
authorJiri Pirko <jiri@mellanox.com>
Wed, 3 Apr 2019 12:24:21 +0000 (14:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Apr 2019 00:42:36 +0000 (17:42 -0700)
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>
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

index 36ec4cb45276d862e822b56f1c15abcc4084a9a6..549c90d3e465f2fd4f7eb494cee47373b953aaf5 100644 (file)
@@ -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");