Skip to content

Commit e14624d

Browse files
committed
[NDIS]
- Disable timer queuing code (hackfix for various network driver failures) - Also needs to be merged into 0.3.12 svn path=/trunk/; revision=48968
1 parent b01fc3d commit e14624d

File tree

1 file changed

+12
-4
lines changed
  • reactos/drivers/network/ndis/ndis

1 file changed

+12
-4
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,23 @@ NdisMCancelTimer(
145145
* - call at IRQL <= DISPATCH_LEVEL
146146
*/
147147
{
148-
KIRQL OldIrql;
148+
//KIRQL OldIrql;
149149

150150
ASSERT_IRQL(DISPATCH_LEVEL);
151151
ASSERT(TimerCancelled);
152152
ASSERT(Timer);
153153

154154
*TimerCancelled = KeCancelTimer (&Timer->Timer);
155155

156+
#if 0
156157
if (*TimerCancelled)
157158
{
158159
KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql);
159160
/* If it's somebody already dequeued it, something is wrong (maybe a double-cancel?) */
160161
if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE);
161162
KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql);
162163
}
164+
#endif
163165
}
164166

165167
VOID NTAPI
@@ -170,6 +172,7 @@ MiniTimerDpcFunction(PKDPC Dpc,
170172
{
171173
PNDIS_MINIPORT_TIMER Timer = DeferredContext;
172174

175+
#if 0
173176
/* Only dequeue if the timer has a period of 0 */
174177
if (!Timer->Timer.Period)
175178
{
@@ -178,6 +181,7 @@ MiniTimerDpcFunction(PKDPC Dpc,
178181
if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE);
179182
KeReleaseSpinLockFromDpcLevel(&Timer->Miniport->Lock);
180183
}
184+
#endif
181185

182186
Timer->MiniportTimerFunction(Dpc,
183187
Timer->MiniportTimerContext,
@@ -240,14 +244,15 @@ NdisMSetPeriodicTimer(
240244
*/
241245
{
242246
LARGE_INTEGER Timeout;
243-
KIRQL OldIrql;
247+
//KIRQL OldIrql;
244248

245249
ASSERT_IRQL(DISPATCH_LEVEL);
246250
ASSERT(Timer);
247251

248252
/* relative delays are negative, absolute are positive; resolution is 100ns */
249253
Timeout.QuadPart = Int32x32To64(MillisecondsPeriod, -10000);
250-
254+
255+
#if 0
251256
/* Lock the miniport block */
252257
KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql);
253258

@@ -260,6 +265,7 @@ NdisMSetPeriodicTimer(
260265

261266
/* Unlock the miniport block */
262267
KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql);
268+
#endif
263269

264270
KeSetTimerEx(&Timer->Timer, Timeout, MillisecondsPeriod, &Timer->Dpc);
265271
}
@@ -285,14 +291,15 @@ NdisMSetTimer(
285291
*/
286292
{
287293
LARGE_INTEGER Timeout;
288-
KIRQL OldIrql;
294+
//KIRQL OldIrql;
289295

290296
ASSERT_IRQL(DISPATCH_LEVEL);
291297
ASSERT(Timer);
292298

293299
/* relative delays are negative, absolute are positive; resolution is 100ns */
294300
Timeout.QuadPart = Int32x32To64(MillisecondsToDelay, -10000);
295301

302+
#if 0
296303
/* Lock the miniport block */
297304
KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql);
298305

@@ -305,6 +312,7 @@ NdisMSetTimer(
305312

306313
/* Unlock the miniport block */
307314
KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql);
315+
#endif
308316

309317
KeSetTimer(&Timer->Timer, Timeout, &Timer->Dpc);
310318
}

0 commit comments

Comments
 (0)