[ros-diffs] [cgutman] 36633: - Move the implementation of NdisMIndicateStatus to MiniStatus and call it from NdisMIndicateStatus - Move the implementation of NdisMIndicateStatusComplete to MiniStatusComplete and call it from NdisMIndicateStatusComplete

cgutman at svn.reactos.org cgutman at svn.reactos.org
Fri Oct 3 20:38:41 CEST 2008


Author: cgutman
Date: Fri Oct  3 13:38:40 2008
New Revision: 36633

URL: http://svn.reactos.org/svn/reactos?rev=36633&view=rev
Log:
 - Move the implementation of NdisMIndicateStatus to MiniStatus and call it from NdisMIndicateStatus
 - Move the implementation of NdisMIndicateStatusComplete to MiniStatusComplete and call it from NdisMIndicateStatusComplete

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/network/ndis/ndis/miniport.c?rev=36633&r1=36632&r2=36633&view=diff
==============================================================================
--- 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 13:38:40 2008
@@ -1052,7 +1052,29 @@
     IN PVOID  StatusBuffer,
     IN UINT  StatusBufferSize)
 {
-    UNIMPLEMENTED
+    PLOGICAL_ADAPTER Adapter = MiniportHandle;
+    PLIST_ENTRY CurrentEntry;
+    PADAPTER_BINDING AdapterBinding;
+    KIRQL OldIrql;
+
+    KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
+
+    CurrentEntry = Adapter->ProtocolListHead.Flink;
+
+    while (CurrentEntry != &Adapter->ProtocolListHead)
+    {
+       AdapterBinding = CONTAINING_RECORD(CurrentEntry, ADAPTER_BINDING, AdapterListEntry);
+
+       (*AdapterBinding->ProtocolBinding->Chars.StatusHandler)(
+           AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
+           GeneralStatus,
+           StatusBuffer,
+           StatusBufferSize);
+
+       CurrentEntry = CurrentEntry->Flink;
+    }
+
+    KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql);
 }
 
 
@@ -1061,7 +1083,26 @@
 MiniStatusComplete(
     IN NDIS_HANDLE  MiniportAdapterHandle)
 {
-    UNIMPLEMENTED
+    PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
+    PLIST_ENTRY CurrentEntry;
+    PADAPTER_BINDING AdapterBinding;
+    KIRQL OldIrql;
+
+    KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
+
+    CurrentEntry = Adapter->ProtocolListHead.Flink;
+
+    while (CurrentEntry != &Adapter->ProtocolListHead)
+    {
+       AdapterBinding = CONTAINING_RECORD(CurrentEntry, ADAPTER_BINDING, AdapterListEntry);
+
+       (*AdapterBinding->ProtocolBinding->Chars.StatusCompleteHandler)(
+           AdapterBinding->NdisOpenBlock.ProtocolBindingContext);
+
+       CurrentEntry = CurrentEntry->Flink;
+    }
+
+    KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql);
 }
 
 
@@ -1137,29 +1178,7 @@
     IN  PVOID       StatusBuffer,
     IN  UINT        StatusBufferSize)
 {
-    PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
-    PLIST_ENTRY CurrentEntry;
-    PADAPTER_BINDING AdapterBinding;
-    KIRQL OldIrql;
-
-    KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
-
-    CurrentEntry = Adapter->ProtocolListHead.Flink;
-
-    while (CurrentEntry != &Adapter->ProtocolListHead)
-    {
-       AdapterBinding = CONTAINING_RECORD(CurrentEntry, ADAPTER_BINDING, AdapterListEntry);
-
-       (*AdapterBinding->ProtocolBinding->Chars.StatusHandler)(
-           AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
-           GeneralStatus,
-           StatusBuffer,
-           StatusBufferSize);
-
-       CurrentEntry = CurrentEntry->Flink;
-    }
-
-    KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql);
+    MiniStatus(MiniportAdapterHandle, GeneralStatus, StatusBuffer, StatusBufferSize);
 }
 
 /*
@@ -1171,26 +1190,7 @@
 NdisMIndicateStatusComplete(
     IN  NDIS_HANDLE MiniportAdapterHandle)
 {
-    PLOGICAL_ADAPTER Adapter = MiniportAdapterHandle;
-    PLIST_ENTRY CurrentEntry;
-    PADAPTER_BINDING AdapterBinding;
-    KIRQL OldIrql;
-
-    KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
-
-    CurrentEntry = Adapter->ProtocolListHead.Flink;
-
-    while (CurrentEntry != &Adapter->ProtocolListHead)
-    {
-       AdapterBinding = CONTAINING_RECORD(CurrentEntry, ADAPTER_BINDING, AdapterListEntry);
-
-       (*AdapterBinding->ProtocolBinding->Chars.StatusCompleteHandler)(
-           AdapterBinding->NdisOpenBlock.ProtocolBindingContext);
-
-       CurrentEntry = CurrentEntry->Flink;
-    }
-
-    KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql);
+    MiniStatusComplete(MiniportAdapterHandle);
 }
 
 



More information about the Ros-diffs mailing list