From owner-p4-projects@FreeBSD.ORG Thu Apr 3 21:11:34 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 69CC31065673; Thu, 3 Apr 2008 21:11:34 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BE771065670 for ; Thu, 3 Apr 2008 21:11:34 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1677A8FC14 for ; Thu, 3 Apr 2008 21:11:34 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m33LBX1S029759 for ; Thu, 3 Apr 2008 21:11:33 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m33LBX7N029757 for perforce@freebsd.org; Thu, 3 Apr 2008 21:11:33 GMT (envelope-from thompsa@freebsd.org) Date: Thu, 3 Apr 2008 21:11:33 GMT Message-Id: <200804032111.m33LBX7N029757@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 139294 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, 03 Apr 2008 21:11:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=139294 Change 139294 by thompsa@thompsa_burger on 2008/04/03 21:11:27 We may panic if stopping the callout in wpi_newstate as the mutex _must_ be held. Go back to bailing from the callout if we arent in RUN anymore but hack it for vap. Kinda icky. Affected files ... .. //depot/projects/vap/sys/dev/wpi/if_wpi.c#14 edit Differences ... ==== //depot/projects/vap/sys/dev/wpi/if_wpi.c#14 (text+ko) ==== @@ -1263,8 +1263,6 @@ ieee80211_state_name[vap->iv_state], ieee80211_state_name[nstate], sc->flags)); - callout_stop(&sc->calib_to); - if (nstate == IEEE80211_S_AUTH) { /* Delay the auth transition until we can update the firmware */ error = wpi_queue_cmd(sc, WPI_AUTH, arg, WPI_QUEUE_NORMAL); @@ -3161,8 +3159,13 @@ wpi_calib_timeout(void *arg) { struct wpi_softc *sc = arg; + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); int temp; + if (vap->iv_state != IEEE80211_S_RUN) + return; + /* update sensor data */ temp = (int)WPI_READ(sc, WPI_TEMPERATURE); DPRINTFN(WPI_DEBUG_TEMP,("Temp in calibration is: %d\n", temp));