From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvVlE-0008FT-QJ for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:36:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvVl8-0008BR-Vl for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:36:51 -0400 Received: from [199.232.76.173] (port=56746 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvVl8-0008B5-Jt for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:36:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19937) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvVl8-0004PI-4S for qemu-devel@nongnu.org; Wed, 07 Oct 2009 08:36:46 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97Caj0Z020528 for ; Wed, 7 Oct 2009 08:36:45 -0400 From: Gerd Hoffmann Date: Wed, 7 Oct 2009 14:36:34 +0200 Message-Id: <1254918996-26050-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1254918996-26050-1-git-send-email-kraxel@redhat.com> References: <1254918996-26050-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [RFC PATCH v2 3/5] ne2k: work without vlan. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/ne2000.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/ne2000.c b/hw/ne2000.c index 87f1e59..0ed6eec 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -322,7 +322,8 @@ void ne2000_ioport_write(void *opaque, uint32_t addr, uint32_t val) index -= NE2000_PMEM_SIZE; /* fail safe: check range on the transmitted length */ if (index + s->tcnt <= NE2000_PMEM_END) { - qemu_send_packet(s->vc, s->mem + index, s->tcnt); + if (s->vc) + qemu_send_packet(s->vc, s->mem + index, s->tcnt); } /* signal end of transfer */ s->tsr = ENTSR_PTX; -- 1.6.2.5