From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvWEQ-00052Z-Hr for qemu-devel@nongnu.org; Wed, 07 Oct 2009 09:07:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvWEL-0004wC-IK for qemu-devel@nongnu.org; Wed, 07 Oct 2009 09:07:01 -0400 Received: from [199.232.76.173] (port=36322 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvWEL-0004vm-3s for qemu-devel@nongnu.org; Wed, 07 Oct 2009 09:06:57 -0400 Received: from mail-qy0-f173.google.com ([209.85.221.173]:35141) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvWEK-0000e9-OJ for qemu-devel@nongnu.org; Wed, 07 Oct 2009 09:06:56 -0400 Received: by qyk3 with SMTP id 3so4296368qyk.4 for ; Wed, 07 Oct 2009 06:06:56 -0700 (PDT) Message-ID: <4ACC926C.6000205@codemonkey.ws> Date: Wed, 07 Oct 2009 08:06:52 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC PATCH v2 3/5] ne2k: work without vlan. References: <1254918996-26050-1-git-send-email-kraxel@redhat.com> <1254918996-26050-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1254918996-26050-4-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Gerd Hoffmann wrote: > 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); > } > Perhaps we should just push the s->vc check into qemu_send_packet since we want this behavior consistently. Regards, Anthony Liguori