Author: cgutman
Date: Tue Sep 23 13:44:17 2008
New Revision: 36433
URL:
http://svn.reactos.org/svn/reactos?rev=36433&view=rev
Log:
- Call the CheckForHang handler at DISPATCH_LEVEL
- Implement MiniReset
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] Tue Sep
23 13:44:17 2008
@@ -595,12 +595,43 @@
*/
{
BOOLEAN Ret = FALSE;
-
+ KIRQL OldIrql;
+
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
if
(Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.CheckForHangHandler)
Ret =
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.CheckForHangHandler)(
Adapter->NdisMiniportBlock.MiniportAdapterContext);
+ KeLowerIrql(OldIrql);
return Ret;
+}
+
+NDIS_STATUS
+MiniReset(
+ PLOGICAL_ADAPTER Adapter,
+ PBOOLEAN AddressingReset)
+/*
+ * FUNCTION: Resets the miniport
+ * ARGUMENTS:
+ * Adapter = Pointer to the logical adapter object
+ * AddressingReset = Set to TRUE if we need to call MiniportSetInformation later
+ * RETURNS:
+ * Status of the operation
+ */
+{
+ NDIS_STATUS Status = NDIS_STATUS_FAILURE;
+ KIRQL OldIrql;
+
+ /* FIXME: What should we return if there isn't a reset handler? */
+
+ KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
+ if
(Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.ResetHandler)
+ Status =
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.ResetHandler)(
+ Adapter->NdisMiniportBlock.MiniportAdapterContext,
+ AddressingReset);
+ KeLowerIrql(OldIrql);
+
+ return Status;
}