From owner-p4-projects@FreeBSD.ORG Thu Jan 4 19:41:49 2007 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 6B85416A412; Thu, 4 Jan 2007 19:41:49 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BAF216A407 for ; Thu, 4 Jan 2007 19:41:49 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1C513C45A for ; Thu, 4 Jan 2007 19:41:49 +0000 (UTC) (envelope-from kmacy@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 l04Jfndi002569 for ; Thu, 4 Jan 2007 19:41:49 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l04Jfmm6002566 for perforce@freebsd.org; Thu, 4 Jan 2007 19:41:48 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 4 Jan 2007 19:41:48 GMT Message-Id: <200701041941.l04Jfmm6002566@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 112488 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: Thu, 04 Jan 2007 19:41:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=112488 Change 112488 by kmacy@kmacy_serendipity:sam_wifi on 2007/01/04 19:41:18 fix LOR by not acquiring the sc lock before wi_stop acquire the sc lock in wi_stop after calling ieee80211_newstate Affected files ... .. //depot/projects/wifi/sys/dev/wi/if_wi.c#27 edit Differences ... ==== //depot/projects/wifi/sys/dev/wi/if_wi.c#27 (text+ko) ==== @@ -672,15 +672,15 @@ int i; int error = 0, wasenabled; - WI_LOCK(sc); + - if (sc->wi_gone) { - WI_UNLOCK(sc); + if (sc->wi_gone) return; - } if ((wasenabled = sc->sc_enabled)) wi_stop(ifp, 1); + + WI_LOCK(sc); wi_reset(ifp); /* common 802.11 configuration */ @@ -874,11 +874,10 @@ struct wi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - WI_LOCK(sc); + ieee80211_new_state(ic, IEEE80211_S_INIT, -1); DELAY(100000); - - ieee80211_new_state(ic, IEEE80211_S_INIT, -1); + WI_LOCK(sc); if (sc->sc_enabled && !sc->wi_gone) { CSR_WRITE_2(sc, WI_INT_EN, 0); wi_cmd(sc, WI_CMD_DISABLE | sc->sc_portnum, 0, 0, 0);