summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_wb.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-12-19 04:19:44 +0000
committerwpaul <wpaul@FreeBSD.org>1998-12-19 04:19:44 +0000
commit6a5ae683b942400b8705c879d51fbefc9edc796a (patch)
tree087c8484b19ff351b1106f9dad61d207ba50a580 /sys/pci/if_wb.c
parent434b0ce44240597b49085b60f3b96f87166796c3 (diff)
downloadFreeBSD-src-6a5ae683b942400b8705c879d51fbefc9edc796a.zip
FreeBSD-src-6a5ae683b942400b8705c879d51fbefc9edc796a.tar.gz
Trim the ethernet CRC from received frames manually in wb_rxeof().
The Winbond chip always includes the CRC with every received frame, and I can't find anything in the Winbond manual that indicates you can program it not to do this.
Diffstat (limited to 'sys/pci/if_wb.c')
-rw-r--r--sys/pci/if_wb.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c
index 1fa7b9a..3e3e634 100644
--- a/sys/pci/if_wb.c
+++ b/sys/pci/if_wb.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_wb.c,v 1.3 1998/12/10 02:02:30 archie Exp $
+ * $Id: if_wb.c,v 1.4 1998/12/14 06:32:56 dillon Exp $
*/
/*
@@ -121,7 +121,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: if_wb.c,v 1.3 1998/12/10 02:02:30 archie Exp $";
+ "$Id: if_wb.c,v 1.4 1998/12/14 06:32:56 dillon Exp $";
#endif
/*
@@ -1375,6 +1375,15 @@ static void wb_rxeof(sc)
total_len = WB_RXBYTES(cur_rx->wb_ptr->wb_status);
/*
+ * XXX The Winbond chip includes the CRC with every
+ * received frame, and there's no way to turn this
+ * behavior off (at least, I can't find anything in
+ * the manual that explains how to do it) so we have
+ * to trim off the CRC manually.
+ */
+ total_len -= ETHER_CRC_LEN;
+
+ /*
* Try to conjure up a new mbuf cluster. If that
* fails, it means we have an out of memory condition and
* should leave the buffer in place and continue. This will
OpenPOWER on IntegriCloud