PERFORCE change 43910 for review
Sam Leffler
sam at FreeBSD.org
Sat Dec 13 12:53:04 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=43910
Change 43910 by sam at sam_ebb on 2003/12/13 12:52:37
reclaim node references held in packets when draining the tx queue
Affected files ...
.. //depot/projects/netperf/sys/dev/ath/if_ath.c#49 edit
Differences ...
==== //depot/projects/netperf/sys/dev/ath/if_ath.c#49 (text+ko) ====
@@ -2246,7 +2246,9 @@
ath_draintxq(struct ath_softc *sc)
{
struct ath_hal *ah = sc->sc_ah;
- struct ifnet *ifp = &sc->sc_ic.ic_if;
+ struct ieee80211com *ic = &sc->sc_ic;
+ struct ifnet *ifp = &ic->ic_if;
+ struct ieee80211_node *ni;
struct ath_buf *bf;
/* XXX return value */
@@ -2278,7 +2280,14 @@
bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap);
m_freem(bf->bf_m);
bf->bf_m = NULL;
+ ni = bf->bf_node;
bf->bf_node = NULL;
+ if (ni != NULL && ni != ic->ic_bss) {
+ /*
+ * Reclaim node reference.
+ */
+ ieee80211_free_node(ic, ni);
+ }
ATH_TXBUF_LOCK(sc);
TAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list);
ATH_TXBUF_UNLOCK(sc);
More information about the p4-projects
mailing list