diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-05-11 10:25:08 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2009-05-11 10:25:08 +0000 |
commit | ece655b4fc8fed41df5152f9ef5c42ab36e9e730 (patch) | |
tree | 9d391bfa2ee4d4ed0d8878d6dbe6ce9c3409be0f /sys/dev | |
parent | 6c7debdd0aa4327eb584b1717b2fd562e2c2d35a (diff) |
preliminary parts for hw vlan tag insertion/removal, ideas gleaned from
via rhinefet. not yet used, but committing now so it isn't lost.
from chris@, ok dlg.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_vr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 0c034036f68..8c1d8eee7c8 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.88 2009/05/11 08:03:57 sthen Exp $ */ +/* $OpenBSD: if_vr.c,v 1.89 2009/05/11 10:25:07 sthen Exp $ */ /* * Copyright (c) 1997, 1998 @@ -899,7 +899,7 @@ vr_rxeof(struct vr_softc *sc) * Handle BPF listeners. Let the BPF user see the packet. */ if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); + bpf_mtap_ether(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif /* pass it on. */ ether_input_mbuf(ifp, m); @@ -1143,7 +1143,7 @@ vr_encap(struct vr_softc *sc, struct vr_chain *c, struct mbuf *m_head) { struct vr_desc *f = NULL; struct mbuf *m_new = NULL; - u_int32_t vr_flags = 0; + u_int32_t vr_flags = 0, vr_status = 0; if (sc->vr_quirks & VR_Q_NEEDALIGN || m_head->m_pkthdr.len < VR_MIN_FRAMELEN || @@ -1207,7 +1207,7 @@ vr_encap(struct vr_softc *sc, struct vr_chain *c, struct mbuf *m_head) f->vr_data = htole32(c->vr_map->dm_segs[0].ds_addr); f->vr_ctl = htole32(c->vr_map->dm_mapsize); f->vr_ctl |= htole32(vr_flags|VR_TXCTL_TLINK|VR_TXCTL_FIRSTFRAG); - f->vr_status = htole32(0); + f->vr_status = htole32(vr_status); f->vr_ctl |= htole32(VR_TXCTL_LASTFRAG|VR_TXCTL_FINT); f->vr_next = htole32(c->vr_nextdesc->vr_paddr); @@ -1258,7 +1258,7 @@ vr_start(struct ifnet *ifp) * to him. */ if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, cur_tx->vr_mbuf, + bpf_mtap_ether(ifp->if_bpf, cur_tx->vr_mbuf, BPF_DIRECTION_OUT); #endif cur_tx = cur_tx->vr_nextdesc; |