DragonFly BSD
DragonFly submit List (threaded) for 2010-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

properly lock iwi watchdog function


From: Johannes Hofmann <johannes.hofmann@xxxxxx>
Date: 20 Jul 2010 19:37:50 GMT

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]