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_otus.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_otus.c')
-rw-r--r-- | sys/dev/usb/if_otus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c index 7c56ed5086e..12bb568f0b7 100644 --- a/sys/dev/usb/if_otus.c +++ b/sys/dev/usb/if_otus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_otus.c,v 1.23 2010/10/30 11:52:29 damien Exp $ */ +/* $OpenBSD: if_otus.c,v 1.24 2010/10/30 18:03:43 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -1383,7 +1383,6 @@ otus_tx(struct otus_softc *sc, struct mbuf *m, struct ieee80211_node *ni) xferlen = sizeof (*head) + m->m_pkthdr.len; m_copydata(m, 0, m->m_pkthdr.len, (caddr_t)&head[1]); m_freem(m); - ieee80211_release_node(ic, ni); DPRINTFN(5, ("tx queued=%d len=%d mac=0x%04x phy=0x%08x rate=%d\n", sc->tx_queued, head->len, head->macctl, head->phyctl, @@ -1394,6 +1393,8 @@ otus_tx(struct otus_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); + sc->tx_queued++; sc->tx_cur = (sc->tx_cur + 1) % OTUS_TX_DATA_LIST_COUNT; @@ -1441,6 +1442,7 @@ sendit: bpf_mtap(ic->ic_rawbpf, m, BPF_DIRECTION_OUT); #endif if (otus_tx(sc, m, ni) != 0) { + ieee80211_release_node(ic, ni); ifp->if_oerrors++; continue; } |