On Thu, 25 Nov 2021 10:01:54 +0800 xiangxia.m.yue@gmail.com wrote:
+#define DRV_NAME "ifb"
+#define DRV_VERSION "1.0"
Let's not invent meaningless driver versions.
quoted hunk ↗ jump to hunk
+#define TX_Q_LIMIT 32
+
struct ifb_q_private {
struct net_device *dev;
struct tasklet_struct ifb_tasklet;@@ -181,6 +185,12 @@ static int ifb_dev_init(struct net_device *dev)
return 0;
}
+static void ifb_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+ strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
Can we make core fill in driver name from rtnl_link_ops so we don't
need to do it in each driver?
+ strlcpy(info->version, DRV_VERSION, sizeof(info->version));
Leave this field as is, core should fill it with the kernel release.
+}