diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-01-14 09:50:21 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-01-14 09:50:21 +0000 |
commit | 49516c3311c3d708ba9b2be8f84fb75ad8a76cb4 (patch) | |
tree | 8aafa443aa197b3109d138c02ced182e696efa1a /sys/dev/pci | |
parent | a0d24ebfe6138fa09ec845c7eab8a0ae2434f1bf (diff) |
- the allmulti target initially enables all multicast mode so don't bother
checking the IFF_ALLMULTI flag.
- clean up vr_encap() a bit.
From: Andrey Matveev <evol at online dot ptt dot ru>
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_vr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index f825d8fefd8..264764e2fa1 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.54 2005/12/10 18:34:11 krw Exp $ */ +/* $OpenBSD: if_vr.c,v 1.55 2006/01/14 09:50:20 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -490,8 +490,8 @@ vr_setmulti(struct vr_softc *sc) rxfilt = CSR_READ_1(sc, VR_RXCFG); -allmulti: if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { +allmulti: rxfilt |= VR_RXCFG_RX_MULTI; CSR_WRITE_1(sc, VR_RXCFG, rxfilt); CSR_WRITE_4(sc, VR_MAR0, 0xFFFFFFFF); @@ -1286,15 +1286,16 @@ vr_encap(struct vr_softc *sc, struct vr_chain *c, struct mbuf *m_head) m_freem(m_head); + c->vr_mbuf = m_new; + f = c->vr_ptr; 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_TXCTL_TLINK|VR_TXCTL_FIRSTFRAG); f->vr_status = htole32(0); - c->vr_mbuf = m_new; - c->vr_ptr->vr_ctl |= htole32(VR_TXCTL_LASTFRAG|VR_TXCTL_FINT); - c->vr_ptr->vr_next = htole32(c->vr_nextdesc->vr_paddr); + f->vr_ctl |= htole32(VR_TXCTL_LASTFRAG|VR_TXCTL_FINT); + f->vr_next = htole32(c->vr_nextdesc->vr_paddr); return (0); } |