From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXADH-0007zQ-VL for qemu-devel@nongnu.org; Fri, 18 Oct 2013 09:35:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXADB-0003XP-VX for qemu-devel@nongnu.org; Fri, 18 Oct 2013 09:35:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXADB-0003Wh-Nn for qemu-devel@nongnu.org; Fri, 18 Oct 2013 09:35:29 -0400 From: Stefan Hajnoczi Date: Fri, 18 Oct 2013 15:35:13 +0200 Message-Id: <1382103314-21608-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1382103314-21608-1-git-send-email-stefanha@redhat.com> References: <1382103314-21608-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 3/4] net/rtl8139: update network information when macaddr is changed in guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Amos Kong , Stefan Hajnoczi , Anthony Liguori From: Amos Kong rtl8139 has same problem as e1000, nic info isn't updated when macaddr is changed in guest. This patch updates the nic info when the last bit of macaddr is written. Signed-off-by: Amos Kong Signed-off-by: Stefan Hajnoczi --- hw/net/rtl8139.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 9b4a650..3225f3d 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -2741,8 +2741,12 @@ static void rtl8139_io_writeb(void *opaque, uint8_t addr, uint32_t val) switch (addr) { - case MAC0 ... MAC0+5: + case MAC0 ... MAC0+4: + s->phys[addr - MAC0] = val; + break; + case MAC0+5: s->phys[addr - MAC0] = val; + qemu_format_nic_info_str(qemu_get_queue(s->nic), s->phys); break; case MAC0+6 ... MAC0+7: /* reserved */ -- 1.8.3.1