summaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
authorPantelis Koukousoulas <pktoss@gmail.com>2009-03-19 02:40:02 +0100
committerDavid S. Miller <davem@davemloft.net>2009-03-19 02:40:02 +0100
commit4783256ef92f5aecd6d54693b16386f2a0021c2a (patch)
tree624d67317331bc4b005a1196f9f5c76d6bd56b45 /drivers/net/virtio_net.c
parentbonding: Fix updating of speed/duplex changes (diff)
downloadlinux-4783256ef92f5aecd6d54693b16386f2a0021c2a.tar.xz
linux-4783256ef92f5aecd6d54693b16386f2a0021c2a.zip
virtio_net: Make virtio_net support carrier detection
Impact: Make NetworkManager work with virtio_net For now the semantics are simple: There is always carrier. This allows a seamless experience with e.g., qemu/kvm where NetworkManager just configures and sets up everything automagically. If/when a generally agreed-upon way to control carrier on/off in the emulator/hypervisor level emerges, it will be trivial to extend the driver to support that too, but for now even this 2-liner makes user experience that much better. Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index c68808336c8c..e67d16c2e5f3 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -612,6 +612,7 @@ static struct ethtool_ops virtnet_ethtool_ops = {
.set_tx_csum = virtnet_set_tx_csum,
.set_sg = ethtool_op_set_sg,
.set_tso = ethtool_op_set_tso,
+ .get_link = ethtool_op_get_link,
};
#define MIN_MTU 68
@@ -739,6 +740,8 @@ static int virtnet_probe(struct virtio_device *vdev)
goto unregister;
}
+ netif_carrier_on(dev);
+
pr_debug("virtnet: registered device %s\n", dev->name);
return 0;