properly lock iwi watchdog function

Johannes Hofmann johannes.hofmann at gmx.de
Tue Jul 20 12:37:50 PDT 2010


This patch properly locks the iwi watchdog function. I have no
idea, why it worked for me before without this.

Cheers,
Johannes


diff --git a/sys/dev/netif/iwi/if_iwi.c b/sys/dev/netif/iwi/if_iwi.c
index eb70b8f..15a886f 100644
--- a/sys/dev/netif/iwi/if_iwi.c
+++ b/sys/dev/netif/iwi/if_iwi.c
@@ -1994,7 +1994,7 @@ iwi_watchdog(void *arg)
 	struct ifnet *ifp = sc->sc_ifp;
 	struct ieee80211com *ic = ifp->if_l2com;
 
-	IWI_LOCK_ASSERT(sc);
+	IWI_LOCK(sc);
 
 	if (sc->sc_tx_timer > 0) {
 		if (--sc->sc_tx_timer == 0) {
@@ -2022,6 +2022,7 @@ iwi_watchdog(void *arg)
 		}
 	}
 	callout_reset(&sc->sc_wdtimer, hz, iwi_watchdog, sc);
+	IWI_UNLOCK(sc);
 }
 
 static int





More information about the Submit mailing list