diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-03-06 23:07:28 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-03-06 23:07:28 +0000 |
commit | 9e2f23f7e6484c04516e9af1742b68830a982bcb (patch) | |
tree | 79f8bb553d26ce693881ce27798a249130f6595f /sys/dev/pci/if_ti.c | |
parent | df5d0fc9c4b166c641811e3f53db7818a77e07b2 (diff) |
add support for vlan tagging correctly; from Chris Pascoe
Diffstat (limited to 'sys/dev/pci/if_ti.c')
-rw-r--r-- | sys/dev/pci/if_ti.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c index 967b81aa67c..ab3c7d127b7 100644 --- a/sys/dev/pci/if_ti.c +++ b/sys/dev/pci/if_ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ti.c,v 1.45 2003/03/05 20:24:04 deraadt Exp $ */ +/* $OpenBSD: if_ti.c,v 1.46 2003/03/06 23:07:27 jason Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -81,6 +81,7 @@ */ #include "bpfilter.h" +#include "vlan.h" #include <sys/param.h> #include <sys/systm.h> @@ -110,6 +111,11 @@ #include <net/bpf.h> #endif +#if NVLAN > 0 +#include <net/if_types.h> +#include <net/if_vlan_var.h> +#endif + #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcidevs.h> @@ -1736,6 +1742,10 @@ ti_attach(parent, self, aux) ifp->if_start = ti_start; ifp->if_watchdog = ti_watchdog; ifp->if_mtu = ETHERMTU; +#if NVLAN >0 + ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; +#endif + IFQ_SET_MAXLEN(&ifp->if_snd, TI_TX_RING_CNT - 1); IFQ_SET_READY(&ifp->if_snd); bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ); |