From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIhzb-000709-Ja for qemu-devel@nongnu.org; Fri, 24 Jul 2015 14:46:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZIhzY-00087G-5E for qemu-devel@nongnu.org; Fri, 24 Jul 2015 14:46:47 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]:20008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZIhzX-000877-VB for qemu-devel@nongnu.org; Fri, 24 Jul 2015 14:46:44 -0400 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 24 Jul 2015 20:42:23 +0200 Message-Id: <1437763343-7980-4-git-send-email-hpoussin@reactos.org> In-Reply-To: <1437763343-7980-1-git-send-email-hpoussin@reactos.org> References: <1437763343-7980-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH for 2.4 3/3] net/dp8393x: remove check of runt packets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Leon Alrae , Aurelien Jarno Ethernet requires that messages are at least 64 bytes on the wire. This limitation does not exist on emulation (no wire message), so remove the check. Netcard is now able to receive small network packets. Signed-off-by: Herv=C3=A9 Poussineau --- hw/net/dp8393x.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 55168b5..d4f811d 100644 --- a/hw/net/dp8393x.c +++ b/hw/net/dp8393x.c @@ -645,11 +645,6 @@ static int dp8393x_receive_filter(dp8393xState *s, c= onst uint8_t * buf, static const uint8_t bcast[] =3D {0xff, 0xff, 0xff, 0xff, 0xff, 0xff= }; int i; =20 - /* Check for runt packet (remember that checksum is not there) */ - if (size < 64 - 4) { - return (s->regs[SONIC_RCR] & SONIC_RCR_RNT) ? 0 : -1; - } - /* Check promiscuous mode */ if ((s->regs[SONIC_RCR] & SONIC_RCR_PRO) && (buf[0] & 1) =3D=3D 0) { return 0; --=20 2.1.4