From 9f9f886166a12751fc090a8f8f1849ec317a0b40 Mon Sep 17 00:00:00 2001 From: Alexey Zaytsev Date: Thu, 4 Aug 2011 03:27:28 +0400 Subject: [PATCH] Set the MAC address _before_ registering the device Signed-off-by: Alexey Zaytsev --- virtio_net/vioif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio_net/vioif.c b/virtio_net/vioif.c index 15258a6..2d93def 100644 --- a/virtio_net/vioif.c +++ b/virtio_net/vioif.c @@ -1347,6 +1347,7 @@ vioif_attach(dev_info_t *devinfo, ddi_attach_cmd_t cmd) if (ret) goto exit_features; + vioif_get_mac(sc); vsc->sc_nvqs = vioif_has_feature(sc, VIRTIO_NET_F_CTRL_VQ) ? 3 : 2; @@ -1421,7 +1422,6 @@ vioif_attach(dev_info_t *devinfo, ddi_attach_cmd_t cmd) goto exit_ints; } - vioif_get_mac(sc); return (DDI_SUCCESS);