diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-10-30 18:03:44 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-10-30 18:03:44 +0000 |
commit | ad0b32f9e90ddafc1a8eb1bc16b0e155afa0d7ca (patch) | |
tree | f3aff1e26ca4eb5f8e282fd3e9064db9ad2bac8a /sys/dev/usb/if_run.c | |
parent | fd05125e3ec4fab9284b606d45a68a018d77627e (diff) |
in otus, tx() can return on error without releasing the node
so release the node in the caller (if_start) instead and do
the same in run(4) for consistency.
Diffstat (limited to 'sys/dev/usb/if_run.c')
-rw-r--r-- | sys/dev/usb/if_run.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index 258c591bf36..f23a5b6d724 100644 --- a/sys/dev/usb/if_run.c +++ b/sys/dev/usb/if_run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_run.c,v 1.79 2010/10/30 11:59:05 damien Exp $ */ +/* $OpenBSD: if_run.c,v 1.80 2010/10/30 18:03:43 damien Exp $ */ /*- * Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -2191,7 +2191,6 @@ run_tx(struct run_softc *sc, struct mbuf *m, struct ieee80211_node *ni) m_copydata(m, 0, m->m_pkthdr.len, (caddr_t)(txwi + 1)); m_freem(m); - ieee80211_release_node(ic, ni); xferlen += sizeof (*txd) + 4; @@ -2201,6 +2200,8 @@ run_tx(struct run_softc *sc, struct mbuf *m, struct ieee80211_node *ni) if (__predict_false(error != USBD_IN_PROGRESS && error != 0)) return error; + ieee80211_release_node(ic, ni); + ring->cur = (ring->cur + 1) % RUN_TX_RING_COUNT; if (++ring->queued >= RUN_TX_RING_COUNT) sc->qfullmsk |= 1 << qid; @@ -2249,6 +2250,7 @@ sendit: bpf_mtap(ic->ic_rawbpf, m, BPF_DIRECTION_OUT); #endif if (run_tx(sc, m, ni) != 0) { + ieee80211_release_node(ic, ni); ifp->if_oerrors++; continue; } |