Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/ic Pull up revision 1.14 (requested by bouyer):



details:   https://anonhg.NetBSD.org/src/rev/eea6895ef5b9
branches:  netbsd-1-5
changeset: 490466:eea6895ef5b9
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Sun Dec 31 20:14:57 2000 +0000

description:
Pull up revision 1.14 (requested by bouyer):
        Add support for 802.1Q virtual LANs.

diffstat:

 sys/dev/ic/lance.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r eed8cf452d14 -r eea6895ef5b9 sys/dev/ic/lance.c
--- a/sys/dev/ic/lance.c        Sun Dec 31 20:14:54 2000 +0000
+++ b/sys/dev/ic/lance.c        Sun Dec 31 20:14:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lance.c,v 1.12 2000/05/12 16:45:42 thorpej Exp $       */
+/*     $NetBSD: lance.c,v 1.12.4.1 2000/12/31 20:14:57 jhawk Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -272,6 +272,8 @@
        printf("%s: %d receive buffers, %d transmit buffers\n",
            sc->sc_dev.dv_xname, sc->sc_nrbuf, sc->sc_ntbuf);
 
+       /* claim 802.1q capability */
+       sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
        /* Attach the interface. */
        if_attach(ifp);
        ether_ifattach(ifp, sc->sc_enaddr);
@@ -468,7 +470,9 @@
        struct ether_header *eh;
 
        if (len <= sizeof(struct ether_header) ||
-           len > ETHERMTU + sizeof(struct ether_header)) {
+           len > ((sc->sc_ethercom.ec_capenable & ETHERCAP_VLAN_MTU) ?
+               ETHER_VLAN_ENCAP_LEN + ETHERMTU + sizeof(struct ether_header) :
+               ETHERMTU + sizeof(struct ether_header))) {
 #ifdef LEDEBUG
                printf("%s: invalid packet size %d; dropping\n",
                    sc->sc_dev.dv_xname, len);



Home | Main Index | Thread Index | Old Index