Message ID | 20211125163049.84970-1-xiangxia.m.yue@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | bde3b0fd8055bf2c00fd20a4e3d65e920c15b443 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,v3] net: ethtool: set a default driver name | expand |
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <kuba@kernel.org>: On Fri, 26 Nov 2021 00:30:49 +0800 you wrote: > From: Tonghao Zhang <xiangxia.m.yue@gmail.com> > > The netdev (e.g. ifb, bareudp), which not support ethtool ops > (e.g. .get_drvinfo), we can use the rtnl kind as a default name. > > ifb netdev may be created by others prefix, not ifbX. > > [...] Here is the summary with links: - [net-next,v3] net: ethtool: set a default driver name https://git.kernel.org/netdev/net-next/c/bde3b0fd8055 You are awesome, thank you!
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index af2d4e022076..3d7bff407580 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -734,6 +734,9 @@ ethtool_get_drvinfo(struct net_device *dev, struct ethtool_devlink_compat *rsp) sizeof(rsp->info.bus_info)); strlcpy(rsp->info.driver, dev->dev.parent->driver->name, sizeof(rsp->info.driver)); + } else if (dev->rtnl_link_ops) { + strlcpy(rsp->info.driver, dev->rtnl_link_ops->kind, + sizeof(rsp->info.driver)); } else { return -EOPNOTSUPP; }