https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4eb45209ea9782abf5e2c766d696ad9a75b5d076

commit 4eb45209ea9782abf5e2c766d696ad9a75b5d076
Author:     Thomas Faber <[email protected]>
AuthorDate: Sat Oct 9 13:47:26 2021 -0400
Commit:     Thomas Faber <[email protected]>
CommitDate: Wed Oct 27 19:27:27 2021 -0400

    [NDIS] Allow timer initialization at DISPATCH_LEVEL.
    
    Spotted by Mortal Wombat.
---
 drivers/network/ndis/ndis/time.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/network/ndis/ndis/time.c b/drivers/network/ndis/ndis/time.c
index a35ea90107a..5234447da4c 100644
--- a/drivers/network/ndis/ndis/time.c
+++ b/drivers/network/ndis/ndis/time.c
@@ -80,10 +80,10 @@ NdisInitializeTimer(
  *     FunctionContext: context (param 2) to be passed to the timer function 
when it runs
  * NOTES:
  *     - TimerFunction will be called at DISPATCH_LEVEL
- *     - call at IRQL = PASSIVE_LEVEL
+ *     - Must be called at IRQL <= DISPATCH_LEVEL
  */
 {
-  PAGED_CODE();
+  ASSERT_IRQL(DISPATCH_LEVEL);
   ASSERT(Timer);
 
   KeInitializeTimer (&Timer->Timer);
@@ -203,10 +203,10 @@ NdisMInitializeTimer(
  *     FunctionContext: argument passed to TimerFunction when it is called
  * NOTES:
  *     - TimerFunction is called at IRQL = DISPATCH_LEVEL
- *     - call at IRQL = PASSIVE_LEVEL
+ *     - Must be called at IRQL <= DISPATCH_LEVEL
  */
 {
-  PAGED_CODE();
+  ASSERT_IRQL(DISPATCH_LEVEL);
   ASSERT(Timer);
 
   KeInitializeTimer (&Timer->Timer);

Reply via email to