mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
ethtool: add compat for devlink info
If driver did not fill the fw_version field, try to call into the new devlink get_info op and collect the versions that way. We assume ethtool was always reporting running versions. v4: - use IS_REACHABLE() to avoid problems with DEVLINK=m (kbuildbot). v3 (Jiri): - do a dump and then parse it instead of special handling; - concatenate all versions (well, all that fit :)). Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7c908f467d
commit
ddb6e99e2d
3 changed files with 80 additions and 0 deletions
|
@ -972,4 +972,14 @@ devlink_info_version_running_put(struct devlink_info_req *req,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if IS_REACHABLE(CONFIG_NET_DEVLINK)
|
||||
void devlink_compat_running_version(struct net_device *dev,
|
||||
char *buf, size_t len);
|
||||
#else
|
||||
static inline void
|
||||
devlink_compat_running_version(struct net_device *dev, char *buf, size_t len)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NET_DEVLINK_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue