kernel - Fix serialization bug in if_ath
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 8 Aug 2014 23:49:38 +0000 (16:49 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 8 Aug 2014 23:49:38 +0000 (16:49 -0700)
* Fix a bug which was causing a serialization assertion to fail.

sys/dev/netif/ath/ath/if_ath.c

index 279f7ce..634dd99 100644 (file)
@@ -5485,11 +5485,11 @@ ath_calibrate(void *arg)
         */
        ath_power_set_power_state(sc, HAL_PM_AWAKE);
 
         */
        ath_power_set_power_state(sc, HAL_PM_AWAKE);
 
+       wlan_serialize_enter();
+
        /* Skip trying to do this if we're in reset */
        if (sc->sc_inreset_cnt)
                goto restart;
        /* Skip trying to do this if we're in reset */
        if (sc->sc_inreset_cnt)
                goto restart;
-
-       wlan_serialize_enter();
        if (ic->ic_flags & IEEE80211_F_SCAN)    /* defer, off channel */
                goto restart;
        longCal = (ticks - sc->sc_lastlongcal >= ath_longcalinterval*hz);
        if (ic->ic_flags & IEEE80211_F_SCAN)    /* defer, off channel */
                goto restart;
        longCal = (ticks - sc->sc_lastlongcal >= ath_longcalinterval*hz);