diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2005-03-19 10:18:50 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2005-03-19 10:18:50 +0000 |
commit | 92f86cf6541a5bfb8abd1fc903ab64381d02d64c (patch) | |
tree | b965f6b39d3d1461df430bd22a105a3324793cdc | |
parent | 37eae594317d33aa1bc65f248fad632acfe5d5d9 (diff) |
add spl calls where appropriate.
-rw-r--r-- | sys/dev/usb/if_ral.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index 648d8267569..6151880abe8 100644 --- a/sys/dev/usb/if_ral.c +++ b/sys/dev/usb/if_ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral.c,v 1.13 2005/03/19 09:52:54 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.14 2005/03/19 10:18:49 damien Exp $ */ /*- * Copyright (c) 2005 @@ -478,6 +478,9 @@ USB_DETACH(ural) { USB_DETACH_START(ural, sc); struct ifnet *ifp = &sc->sc_ic.ic_if; + int s; + + s = splusb(); usb_rem_task(sc->sc_udev, &sc->sc_task); timeout_del(&sc->scan_ch); @@ -501,6 +504,8 @@ USB_DETACH(ural) ieee80211_ifdetach(ifp); if_detach(ifp); + splx(s); + usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, USBDEV(sc->sc_dev)); @@ -767,6 +772,7 @@ ural_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) struct ural_softc *sc = data->sc; struct ieee80211com *ic = &sc->sc_ic; struct ifnet *ifp = &ic->ic_if; + int s; if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) @@ -780,6 +786,8 @@ ural_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) return; } + s = splnet(); + m_freem(data->m); data->m = NULL; ieee80211_release_node(ic, data->ni); @@ -792,6 +800,8 @@ ural_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) sc->sc_tx_timer = 0; ifp->if_flags &= ~IFF_OACTIVE; ural_start(ifp); + + splx(s); } Static void @@ -805,7 +815,7 @@ ural_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) struct ieee80211_frame *wh; struct ieee80211_node *ni; struct mbuf *m; - int len; + int s, len; if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) @@ -842,6 +852,8 @@ ural_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) m->m_pkthdr.len = m->m_len = (letoh32(desc->flags) >> 16) & 0xfff; m->m_flags |= M_HASFCS; /* hardware appends FCS */ + s = splnet(); + #if NBPFILTER > 0 if (sc->sc_drvbpf != NULL) { struct mbuf mb; @@ -871,6 +883,8 @@ ural_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) /* node is no longer needed */ ieee80211_release_node(ic, ni); + splx(s); + MGETHDR(data->m, M_DONTWAIT, MT_DATA); if (data->m == NULL) { printf("%s: could not allocate rx mbuf\n", |