Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Dec 2003 12:53:02 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 43910 for review
Message-ID:  <200312132053.hBDKr2xR069671@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=43910

Change 43910 by sam@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312132053.hBDKr2xR069671>