|
@@ -705,6 +705,19 @@ static int virtnet_close(struct net_device *dev)
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void virtnet_get_drvinfo(struct net_device *dev,
|
|
|
|
+ struct ethtool_drvinfo *drvinfo)
|
|
|
|
+{
|
|
|
|
+ struct virtnet_info *vi = netdev_priv(dev);
|
|
|
|
+ struct virtio_device *vdev = vi->vdev;
|
|
|
|
+
|
|
|
|
+ strncpy(drvinfo->driver, KBUILD_MODNAME, ARRAY_SIZE(drvinfo->driver));
|
|
|
|
+ strncpy(drvinfo->version, "N/A", ARRAY_SIZE(drvinfo->version));
|
|
|
|
+ strncpy(drvinfo->fw_version, "N/A", ARRAY_SIZE(drvinfo->fw_version));
|
|
|
|
+ strncpy(drvinfo->bus_info, dev_name(&vdev->dev),
|
|
|
|
+ ARRAY_SIZE(drvinfo->bus_info));
|
|
|
|
+}
|
|
|
|
+
|
|
static int virtnet_set_tx_csum(struct net_device *dev, u32 data)
|
|
static int virtnet_set_tx_csum(struct net_device *dev, u32 data)
|
|
{
|
|
{
|
|
struct virtnet_info *vi = netdev_priv(dev);
|
|
struct virtnet_info *vi = netdev_priv(dev);
|
|
@@ -817,6 +830,7 @@ static void virtnet_vlan_rx_kill_vid(struct net_device *dev, u16 vid)
|
|
}
|
|
}
|
|
|
|
|
|
static const struct ethtool_ops virtnet_ethtool_ops = {
|
|
static const struct ethtool_ops virtnet_ethtool_ops = {
|
|
|
|
+ .get_drvinfo = virtnet_get_drvinfo,
|
|
.set_tx_csum = virtnet_set_tx_csum,
|
|
.set_tx_csum = virtnet_set_tx_csum,
|
|
.set_sg = ethtool_op_set_sg,
|
|
.set_sg = ethtool_op_set_sg,
|
|
.set_tso = ethtool_op_set_tso,
|
|
.set_tso = ethtool_op_set_tso,
|