Date: Tue, 19 Feb 2008 01:57:33 GMT From: Andrew Thompson <thompsa@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 135694 for review Message-ID: <200802190157.m1J1vXxR025863@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135694 Change 135694 by thompsa@thompsa_heff on 2008/02/19 01:57:33 MF //depot/user/benjsc/wpi/sys/dev/wpi/if_wpi.c@130843 Fix locking in wpi_init. Affected files ... .. //depot/projects/wifi/sys/dev/wpi/if_wpi.c#10 edit Differences ... ==== //depot/projects/wifi/sys/dev/wpi/if_wpi.c#10 (text+ko) ==== @@ -3157,10 +3157,10 @@ WPI_WRITE(sc, WPI_UCODE_CLR, WPI_RADIO_OFF); WPI_WRITE(sc, WPI_UCODE_CLR, WPI_RADIO_OFF); - if ((error = wpi_load_firmware(sc)) != 0) { + if ((wpi_load_firmware(sc)) != 0) { device_printf(sc->sc_dev, "A problem occurred loading the firmware to the driver\n"); - return; + goto fail; } /* At this point the firmware is up and running. If the hardware @@ -3177,7 +3177,7 @@ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_drv_flags |= IFF_DRV_RUNNING; device_printf(sc->sc_dev,"Radio Transmitter is switched off\n"); - return; + goto fail; } /* wait for thermal sensors to calibrate */ @@ -3190,8 +3190,7 @@ if (ntries == 1000) { device_printf(sc->sc_dev, "timeout waiting for thermal sensors calibration\n"); - error = ETIMEDOUT; - return; + goto fail; } DPRINTFN(WPI_DEBUG_TEMP,("temperature %d\n", sc->temp)); @@ -3204,6 +3203,10 @@ ieee80211_new_state(ic, IEEE80211_S_RUN, -1); else if (ic->ic_roaming != IEEE80211_ROAMING_MANUAL) ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); + return; + +fail: + WPI_UNLOCK(sc); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802190157.m1J1vXxR025863>