diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-08-24 15:20:10 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-08-25 23:22:53 +0300 |
commit | 0c1989754f76b52bd30581ff543890cab8c75a9d (patch) | |
tree | 61b90bd5168f4ab756c2eef92b75c3c4dd5bbdd0 /drivers/net/netdevsim | |
parent | bb67012331f7f07ff325877fbbb430bc515d371e (diff) | |
download | linux-0c1989754f76b52bd30581ff543890cab8c75a9d.tar.xz |
netdevsim: add version fw.mgmt info info_get() and mark as a component
Fix the only component user which is netdevsim. It uses component named
"fw.mgmt" in selftests. So add this version to info_get() output with
version type component.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/netdevsim')
-rw-r--r-- | drivers/net/netdevsim/dev.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index e88f783c297e..d6938faf6c8b 100644 --- a/drivers/net/netdevsim/dev.c +++ b/drivers/net/netdevsim/dev.c @@ -984,7 +984,17 @@ static int nsim_dev_info_get(struct devlink *devlink, struct devlink_info_req *req, struct netlink_ext_ack *extack) { - return devlink_info_driver_name_put(req, DRV_NAME); + int err; + + err = devlink_info_driver_name_put(req, DRV_NAME); + if (err) + return err; + err = devlink_info_version_stored_put_ext(req, "fw.mgmt", "10.20.30", + DEVLINK_INFO_VERSION_TYPE_COMPONENT); + if (err) + return err; + return devlink_info_version_running_put_ext(req, "fw.mgmt", "10.20.30", + DEVLINK_INFO_VERSION_TYPE_COMPONENT); } #define NSIM_DEV_FLASH_SIZE 500000 |