Author: cgutman
Date: Thu Sep 11 15:57:51 2008
New Revision: 36147
URL:
http://svn.reactos.org/svn/reactos?rev=36147&view=rev
Log:
- Call MiniportQueryInformation at the correct IRQL
- Call MiniportSetInformation at the correct IRQL
- Call QueryInformationComplete at the correct IRQL
- Call SetInformationComplete at the correct IRQL
- All IRQLs verified by MSDN
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Thu Sep
11 15:57:51 2008
@@ -548,10 +548,12 @@
{
NDIS_STATUS NdisStatus;
ULONG BytesNeeded;
+ KIRQL OldIrql;
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
/* call the miniport's queryinfo handler */
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
NdisStatus =
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.QueryInformationHandler)(
Adapter->NdisMiniportBlock.MiniportAdapterContext,
Oid,
@@ -559,6 +561,7 @@
Size,
BytesWritten,
&BytesNeeded);
+ KeLowerIrql(OldIrql);
/* FIXME: Wait in pending case! */
@@ -678,14 +681,17 @@
* Status of operation
*/
{
+ NDIS_STATUS Status;
+ KIRQL OldIrql;
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
Adapter->MediaRequest = NdisRequest;
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
switch (NdisRequest->RequestType)
{
case NdisRequestQueryInformation:
- return
(*Adapter->DriverHandle->MiniportCharacteristics.QueryInformationHandler)(
+ Status =
(*Adapter->DriverHandle->MiniportCharacteristics.QueryInformationHandler)(
Adapter->MiniportAdapterContext,
NdisRequest->DATA.QUERY_INFORMATION.Oid,
NdisRequest->DATA.QUERY_INFORMATION.InformationBuffer,
@@ -695,7 +701,7 @@
break;
case NdisRequestSetInformation:
- return
(*Adapter->DriverHandle->MiniportCharacteristics.SetInformationHandler)(
+ Status =
(*Adapter->DriverHandle->MiniportCharacteristics.SetInformationHandler)(
Adapter->MiniportAdapterContext,
NdisRequest->DATA.SET_INFORMATION.Oid,
NdisRequest->DATA.SET_INFORMATION.InformationBuffer,
@@ -705,8 +711,11 @@
break;
default:
- return NDIS_STATUS_FAILURE;
- }
+ Status = NDIS_STATUS_FAILURE;
+ }
+
+ KeLowerIrql(OldIrql);
+ return Status;
}
@@ -722,9 +731,12 @@
{
PNDIS_MINIPORT_BLOCK MiniportBlock =
(PNDIS_MINIPORT_BLOCK)MiniportAdapterHandle;
+ KIRQL OldIrql;
ASSERT(MiniportBlock);
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
if( MiniportBlock->QueryCompleteHandler )
(MiniportBlock->QueryCompleteHandler)(MiniportAdapterHandle, Status);
+ KeLowerIrql(OldIrql);
}
@@ -1910,7 +1922,10 @@
IN NDIS_HANDLE MiniportAdapterHandle,
IN NDIS_STATUS Status)
{
+ KIRQL OldIrql;
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
(*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->SetCompleteHandler)(MiniportAdapterHandle,
Status);
+ KeLowerIrql(OldIrql);
}