diff options
author | sam <sam@FreeBSD.org> | 2004-01-07 19:16:49 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2004-01-07 19:16:49 +0000 |
commit | 8b6f2b1c4029d3e93bcd47c87cea4984749b9abf (patch) | |
tree | 1b8fb360802a940ce1d33183845645f79639ad62 /sys/dev/ath | |
parent | 48b67bc80e6d4225ee307998124e6f8758d62da4 (diff) | |
download | FreeBSD-src-8b6f2b1c4029d3e93bcd47c87cea4984749b9abf.zip FreeBSD-src-8b6f2b1c4029d3e93bcd47c87cea4984749b9abf.tar.gz |
When draining the tx queue reclaim any node references held in packets.
This fixes a problem when operating as an AP where clients would get
stuck in the node table because the reference count never went to zero.
Diffstat (limited to 'sys/dev/ath')
-rw-r--r-- | sys/dev/ath/if_ath.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 3b07851..33748a3 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -2238,7 +2238,9 @@ static void 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 */ @@ -2272,7 +2274,14 @@ ath_draintxq(struct ath_softc *sc) 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); |