summaryrefslogtreecommitdiffstats
path: root/sys/dev/txp/if_txp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/txp/if_txp.c')
-rw-r--r--sys/dev/txp/if_txp.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index f5e72b1..d9aa0b7 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -39,8 +39,6 @@
* Driver for 3c990 (Typhoon) Ethernet ASIC
*/
-#include "vlan.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sockio.h>
@@ -54,6 +52,7 @@
#include <net/ethernet.h>
#include <net/if_dl.h>
#include <net/if_types.h>
+#include <net/if_vlan_var.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
@@ -66,10 +65,6 @@
#include <net/bpf.h>
-#if NVLAN > 0
-#include <net/if_vlan_var.h>
-#endif
-
#include <vm/vm.h> /* for vtophys */
#include <vm/pmap.h> /* for vtophys */
#include <machine/clock.h> /* for DELAY */
@@ -809,14 +804,11 @@ txp_rx_reclaim(sc, r)
/* Remove header from mbuf and pass it on. */
m_adj(m, sizeof(struct ether_header));
-#if NVLAN > 0
if (rxd->rx_stat & RX_STAT_VLAN) {
- if (vlan_input_tag(eh, m,
- htons(rxd->rx_vlan >> 16)) < 0)
- ifp->if_noproto++;
+ VLAN_INPUT_TAG(ifp, eh, m, htons(rxd->rx_vlan >> 16));
goto next;
}
-#endif
+
ether_input(ifp, eh, m);
next:
@@ -1317,9 +1309,7 @@ txp_start(ifp)
struct mbuf *m, *m0;
struct txp_swdesc *sd;
u_int32_t firstprod, firstcnt, prod, cnt;
-#if NVLAN > 0
struct ifvlan *ifv;
-#endif
if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
return;
@@ -1356,14 +1346,13 @@ txp_start(ifp)
if (++cnt >= (TX_ENTRIES - 4))
goto oactive;
-#if NVLAN > 0
if ((m->m_flags & (M_PROTO1|M_PKTHDR)) == (M_PROTO1|M_PKTHDR) &&
m->m_pkthdr.rcvif != NULL) {
ifv = m->m_pkthdr.rcvif->if_softc;
txd->tx_pflags = TX_PFLAGS_VLAN |
(htons(ifv->ifv_tag) << TX_PFLAGS_VLANTAG_S);
}
-#endif
+
if (m->m_pkthdr.csum_flags & CSUM_IP)
txd->tx_pflags |= TX_PFLAGS_IPCKSUM;
@@ -1879,12 +1868,10 @@ txp_capabilities(sc)
sc->sc_tx_capability = ext->ext_1 & OFFLOAD_MASK;
sc->sc_rx_capability = ext->ext_2 & OFFLOAD_MASK;
-#if NVLAN > 0
if (rsp->rsp_par2 & rsp->rsp_par3 & OFFLOAD_VLAN) {
sc->sc_tx_capability |= OFFLOAD_VLAN;
sc->sc_rx_capability |= OFFLOAD_VLAN;
}
-#endif
#if 0
/* not ready yet */
OpenPOWER on IntegriCloud