diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2006-11-21 22:06:27 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2006-11-21 22:06:27 +0000 |
commit | 29efd5d39ae2198bec8ffc44fa81e1d68a88037f (patch) | |
tree | 51e55105287505c55b50121eb7967173f6cba132 | |
parent | d0f97a3f2d9219b3356b4be6f392b88df6197b1b (diff) |
Free allocated mbufs at TX done. While there also reset some TX descriptor
values.
Fixes "WARNING: mclpool limit reached; increase kern.maxclusters"
ok claudio@
-rw-r--r-- | sys/dev/ic/malo.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index 9482df6a2fc..8c6074c5138 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.29 2006/11/16 21:18:42 mglocker Exp $ */ +/* $OpenBSD: malo.c,v 1.30 2006/11/21 22:06:26 mglocker Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -1201,9 +1201,17 @@ malo_tx_intr(struct malo_softc *sc) break; } + /* cleanup TX data and TX descritpor */ + bus_dmamap_sync(sc->sc_dmat, data->map, 0, + data->map->dm_mapsize, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->sc_dmat, data->map); + m_freem(data->m); ieee80211_release_node(ic, data->ni); + data->m = NULL; data->ni = NULL; data->softstat &= ~ 0x80; + desc->status = 0; + desc->len = 0; DPRINTFN(2, ("tx done idx=%u\n", sc->sc_txring.stat)); |