summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhay <jhay@FreeBSD.org>2001-12-05 09:34:28 +0000
committerjhay <jhay@FreeBSD.org>2001-12-05 09:34:28 +0000
commit4561eee87096a9a0e010f63bfe1ea13e8ba58d39 (patch)
tree977c1f063478cac37b656282e0faa8de6f9aab4e
parentce9fbef9c57f598c21b4ddb5aa83d5d0bf1427c1 (diff)
downloadFreeBSD-src-4561eee87096a9a0e010f63bfe1ea13e8ba58d39.zip
FreeBSD-src-4561eee87096a9a0e010f63bfe1ea13e8ba58d39.tar.gz
Add VLAN support.
MFC after: 7 days
-rw-r--r--sys/pci/if_sis.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index b123fa9..5a5c0b8 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -71,6 +71,8 @@
#include <net/ethernet.h>
#include <net/if_dl.h>
#include <net/if_media.h>
+#include <net/if_types.h>
+#include <net/if_vlan_var.h>
#include <net/bpf.h>
@@ -1082,6 +1084,12 @@ static int sis_attach(dev)
* Call MI attach routine.
*/
ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
+
+ /*
+ * Tell the upper layer(s) we support long frames.
+ */
+ ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header);
+
callout_handle_init(&sc->sis_stat_ch);
SIS_UNLOCK(sc);
return(0);
@@ -1708,6 +1716,9 @@ static void sis_init(xsc)
/* Set RX configuration */
CSR_WRITE_4(sc, SIS_RX_CFG, SIS_RXCFG);
+ /* Accept Long Packets for VLAN support */
+ SIS_SETBIT(sc, SIS_RX_CFG, SIS_RXCFG_RX_JABBER);
+
/* Set TX configuration */
if (IFM_SUBTYPE(mii->mii_media_active) == IFM_10_T) {
CSR_WRITE_4(sc, SIS_TX_CFG, SIS_TXCFG_10);
OpenPOWER on IntegriCloud