[NDIS]
authorCameron Gutman <aicommander@gmail.com>
Tue, 22 Jun 2010 05:37:31 +0000 (05:37 +0000)
committerCameron Gutman <aicommander@gmail.com>
Tue, 22 Jun 2010 05:37:31 +0000 (05:37 +0000)
- Dequeue the timer earlier so the timer queue will be in a valid state if any timers are modified during the miniport's timer callback

svn path=/trunk/; revision=47825

reactos/drivers/network/ndis/ndis/time.c

index 0e8cdd4..eb5d005 100644 (file)
@@ -170,11 +170,6 @@ MiniTimerDpcFunction(PKDPC Dpc,
 {
   PNDIS_MINIPORT_TIMER Timer = DeferredContext;
 
-  Timer->MiniportTimerFunction(Dpc,
-                               Timer->MiniportTimerContext,
-                               SystemArgument1,
-                               SystemArgument2);
-
   /* Only dequeue if the timer has a period of 0 */
   if (!Timer->Timer.Period)
   {
@@ -183,6 +178,11 @@ MiniTimerDpcFunction(PKDPC Dpc,
       if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE);
       KeReleaseSpinLockFromDpcLevel(&Timer->Miniport->Lock);
   }
+
+  Timer->MiniportTimerFunction(Dpc,
+                               Timer->MiniportTimerContext,
+                               SystemArgument1,
+                               SystemArgument2);
 }
 
 \f