Author: cgutman
Date: Fri Oct 3 16:44:12 2008
New Revision: 36635
URL:
http://svn.reactos.org/svn/reactos?rev=36635&view=rev
Log:
- Send NDIS_STATUS_RESET_START to all bound protocols before we reset
- Send NDIS_STATUS_RESET_END to all bound protocols after we reset
- Set MiniportBusy to TRUE if the MiniportReset handler returned NDIS_STATUS_PENDING
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] Fri Oct
3 16:44:12 2008
@@ -298,7 +298,13 @@
IN NDIS_STATUS Status,
IN BOOLEAN AddressingReset)
{
- UNIMPLEMENTED
+ PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
+ KIRQL OldIrql;
+ NDIS_DbgPrint(MIN_TRACE, ("FIXME: MiniResetComplete is partially
implemented\n"));
+ NdisMIndicateStatus(Adapter, NDIS_STATUS_RESET_END, NULL, 0);
+ KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
+ Adapter->MiniportBusy = FALSE;
+ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql);
}
@@ -631,11 +637,23 @@
return NDIS_STATUS_PENDING;
}
+ NdisMIndicateStatus(Adapter, NDIS_STATUS_RESET_START, NULL, 0);
+ NdisMIndicateStatusComplete(Adapter);
+
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
Status =
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.ResetHandler)(
Adapter->NdisMiniportBlock.MiniportAdapterContext,
AddressingReset);
KeLowerIrql(OldIrql);
+
+ if (Status != NDIS_STATUS_PENDING) {
+ NdisMIndicateStatus(Adapter, NDIS_STATUS_RESET_END, NULL, 0);
+ NdisMIndicateStatusComplete(Adapter);
+ } else {
+ KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
+ Adapter->MiniportBusy = TRUE;
+ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql);
+ }
return Status;
}
@@ -953,6 +971,9 @@
break;
case NdisWorkItemResetRequested:
+ NdisMIndicateStatus(Adapter, NDIS_STATUS_RESET_START, NULL, 0);
+ NdisMIndicateStatusComplete(Adapter);
+
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
NdisStatus =
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.ResetHandler)(
Adapter->NdisMiniportBlock.MiniportAdapterContext,