Author: cgutman
Date: Fri Oct 3 13:51:33 2008
New Revision: 36634
URL:
http://svn.reactos.org/svn/reactos?rev=36634&view=rev
Log:
- Merge aicom-network-fixes up to r36633
- tcpip's ProtocolStatus routine now gets called if a media status change occurs
- This would fix a problem in which tcpip doesn't recognize the disconnect of an
adapter but the ProtocolStatus handler in tcpip isn't implemented yet so the bug
remains
Modified:
trunk/reactos/drivers/network/ndis/ndis/miniport.c
Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Fri Oct 3 13:51:33
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);
}
@@ -1126,7 +1167,7 @@
}
/*
- * @unimplemented
+ * @implemented
*/
#undef NdisMIndicateStatus
VOID
@@ -1137,11 +1178,11 @@
IN PVOID StatusBuffer,
IN UINT StatusBufferSize)
{
- UNIMPLEMENTED
-}
-
-/*
- * @unimplemented
+ MiniStatus(MiniportAdapterHandle, GeneralStatus, StatusBuffer, StatusBufferSize);
+}
+
+/*
+ * @implemented
*/
#undef NdisMIndicateStatusComplete
VOID
@@ -1149,7 +1190,7 @@
NdisMIndicateStatusComplete(
IN NDIS_HANDLE MiniportAdapterHandle)
{
- UNIMPLEMENTED
+ MiniStatusComplete(MiniportAdapterHandle);
}