From owner-p4-projects@FreeBSD.ORG Fri Oct 6 20:47:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA00016A415; Fri, 6 Oct 2006 20:47:36 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91FB916A40F for ; Fri, 6 Oct 2006 20:47:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4382843D6B for ; Fri, 6 Oct 2006 20:47:36 +0000 (GMT) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k96Kla6M006469 for ; Fri, 6 Oct 2006 20:47:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k96KlaVA006466 for perforce@freebsd.org; Fri, 6 Oct 2006 20:47:36 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 6 Oct 2006 20:47:36 GMT Message-Id: <200610062047.k96KlaVA006466@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 107374 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Oct 2006 20:47:37 -0000 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; };