summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2005-07-02 22:04:54 +0000
committerbrad <brad@openbsd.org>2005-07-02 22:04:54 +0000
commit48b615047abb4193af152bd9feb77af3792f9a50 (patch)
treee2cc825e6b46168cdd99d71439a79b855aff5645
parent- mbuf external storage is of (caddr_t), not (caddr_t *). (diff)
downloadwireguard-openbsd-48b615047abb4193af152bd9feb77af3792f9a50.tar.xz
wireguard-openbsd-48b615047abb4193af152bd9feb77af3792f9a50.zip
set IFCAP_VLAN_MTU and do not whine if we cannot get mbufs
-rw-r--r--sys/dev/ic/mtd8xx.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c
index 20789d46c00..aeb1c4ffad7 100644
--- a/sys/dev/ic/mtd8xx.c
+++ b/sys/dev/ic/mtd8xx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtd8xx.c,v 1.8 2005/01/15 05:24:11 brad Exp $ */
+/* $OpenBSD: mtd8xx.c,v 1.9 2005/07/02 22:04:54 brad Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
@@ -168,6 +168,8 @@ mtd_attach(struct mtd_softc *sc)
IFQ_SET_READY(&ifp->if_snd);
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
+ ifp->if_capabilities = IFCAP_VLAN_MTU;
+
/*
* Initialize our media structures and probe the MII.
*/
@@ -498,16 +500,11 @@ mtd_newbuf(struct mtd_softc *sc, int i, struct mbuf *m)
if (m == NULL) {
MGETHDR(m_new, M_DONTWAIT, MT_DATA);
- if (m_new == NULL) {
- printf("%s: no memory for rx list "
- "-- packet dropped!\n", sc->sc_dev.dv_xname);
+ if (m_new == NULL)
return (1);
- }
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {
- printf("%s: no memory for rx list "
- "-- packet dropped!\n", sc->sc_dev.dv_xname);
m_freem(m_new);
return (1);
}
@@ -515,7 +512,6 @@ mtd_newbuf(struct mtd_softc *sc, int i, struct mbuf *m)
if (bus_dmamap_load(sc->sc_dmat, sc->sc_rx_sparemap,
mtod(m_new, caddr_t), MCLBYTES, NULL,
BUS_DMA_NOWAIT) != 0) {
- printf("%s: rx load failed\n", sc->sc_dev.dv_xname);
m_freem(m_new);
return (1);
}