]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[rtl8139] Strip CRC from received packets
authorMichael Brown <mcb30@ipxe.org>
Fri, 3 Sep 2010 15:16:18 +0000 (16:16 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 3 Sep 2010 20:29:44 +0000 (21:29 +0100)
The rtl8139 driver includes the Ethernet CRC within the received
packet.  All current protocols ignore trailing garbage, but FCoE
requires the frame length to be correct (since the FCoE footer
position is calculated from the end of the packet), so fix the driver
to strip out the CRC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/rtl8139.c

index 208db097521d572abad21a5b4969a6962ead30bb..d5fb178fda6e4319a8f2831307dc4b5186c184a4 100644 (file)
@@ -458,6 +458,7 @@ static void rtl_poll ( struct net_device *netdev ) {
                                 rx_len - wrapped_len );
                        memcpy ( iob_put ( rx_iob, wrapped_len ),
                                 rtl->rx.ring, wrapped_len );
+                       iob_unput ( rx_iob, 4 ); /* Strip CRC */
 
                        netdev_rx ( netdev, rx_iob );
                } else {