Date: Fri, 6 Oct 2006 20:47:36 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 107374 for review Message-ID: <200610062047.k96KlaVA006466@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=107374 Change 107374 by hselasky@hselasky_mini_itx on 2006/10/06 20:47:30 Bug fixes. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_ural.c#13 edit .. //depot/projects/usb/src/sys/dev/usb/if_uralreg.h#7 edit .. //depot/projects/usb/src/sys/dev/usb/if_uralvar.h#9 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_ural.c#13 (text+ko) ==== @@ -1828,6 +1828,8 @@ error = ieee80211_media_change(ifp); if (error != ENETRESET) { goto done; + } else { + error = 0; } if ((ifp->if_flags & IFF_UP) && @@ -1852,16 +1854,19 @@ { struct ural_softc *sc = ifp->if_softc; struct ieee80211com *ic = &(sc->sc_ic); + int error = 0; mtx_lock(&(sc->sc_mtx)); if (ic->ic_opmode != IEEE80211_M_MONITOR) { - return ENETRESET; + error = ENETRESET; + goto done; } usbd_config_td_queue_command (&(sc->sc_config_td), &ural_cfg_set_chan, 0); + done: mtx_unlock(&(sc->sc_mtx)); return 0; @@ -1935,8 +1940,6 @@ sc->sc_flags &= ~(URAL_FLAG_SEND_BYTE_FRAME| URAL_FLAG_SEND_BCN_FRAME); - - wakeup(&(sc->sc_wakeup_bcn)); } return; } @@ -1944,8 +1947,6 @@ static void ural_cfg_tx_bcn(struct ural_softc *sc) { - register int error; - if ((sc->sc_flags & URAL_FLAG_LL_READY) && (sc->sc_flags & URAL_FLAG_HL_READY)) { @@ -1953,6 +1954,11 @@ struct ieee80211_node *ni = sc->sc_ic.ic_bss; struct mbuf *m; + if (sc->sc_bcn_mbuf) { + DPRINTF(sc,0, "beacon already in progress!\n"); + return; + } + m = ieee80211_beacon_alloc(ic, ni, &sc->sc_bo); if (m == NULL) { @@ -1971,17 +1977,6 @@ /* start transfer, if not started */ usbd_transfer_start(sc->sc_xfer[0]); - - while (sc->sc_flags & (URAL_FLAG_SEND_BYTE_FRAME| - URAL_FLAG_SEND_BCN_FRAME)) { - - if (usbd_config_td_is_gone(&(sc->sc_config_td))) { - break; - } - - error = msleep(&(sc->sc_wakeup_bcn), &(sc->sc_mtx), - 0, "ural beacon sleep", 0); - } } return; } ==== //depot/projects/usb/src/sys/dev/usb/if_uralreg.h#7 (text+ko) ==== ==== //depot/projects/usb/src/sys/dev/usb/if_uralvar.h#9 (text+ko) ==== @@ -163,7 +163,5 @@ uint8_t sc_scan_timer; uint8_t sc_amrr_timer; uint8_t sc_name[32]; - - uint8_t sc_wakeup_bcn; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610062047.k96KlaVA006466>