[ros-diffs] [cgutman] 36670: - Partially implement ProtocolStatus in tcpip

cgutman at svn.reactos.org cgutman at svn.reactos.org
Tue Oct 7 01:19:22 CEST 2008


Author: cgutman
Date: Mon Oct  6 18:19:22 2008
New Revision: 36670

URL: http://svn.reactos.org/svn/reactos?rev=36670&view=rev
Log:
 - Partially implement ProtocolStatus in tcpip

Modified:
    branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c

Modified: branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c?rev=36670&r1=36669&r2=36670&view=diff
==============================================================================
--- branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Mon Oct  6 18:19:22 2008
@@ -517,19 +517,44 @@
 
 VOID STDCALL ProtocolStatus(
     NDIS_HANDLE BindingContext,
-    NDIS_STATUS GenerelStatus,
+    NDIS_STATUS GeneralStatus,
     PVOID StatusBuffer,
     UINT StatusBufferSize)
 /*
  * FUNCTION: Called by NDIS when the underlying driver has changed state
  * ARGUMENTS:
  *     BindingContext   = Pointer to a device context (LAN_ADAPTER)
- *     GenerelStatus    = A generel status code
+ *     GeneralStatus    = A general status code
  *     StatusBuffer     = Pointer to a buffer with medium-specific data
  *     StatusBufferSize = Number of bytes in StatusBuffer
  */
 {
+    PLAN_ADAPTER Adapter = BindingContext;
+
     TI_DbgPrint(DEBUG_DATALINK, ("Called.\n"));
+
+    switch(GeneralStatus)
+    {
+      case NDIS_STATUS_MEDIA_CONNECT:
+         DbgPrint("NDIS_STATUS_MEDIA_CONNECT\n");
+         break;
+
+      case NDIS_STATUS_MEDIA_DISCONNECT:
+         DbgPrint("NDIS_STATUS_MEDIA_DISCONNECT\n");
+         break;
+
+      case NDIS_STATUS_RESET_START:
+         Adapter->State = LAN_STATE_RESETTING;
+         break;
+
+      case NDIS_STATUS_RESET_END:
+         Adapter->State = LAN_STATE_STARTED;
+         break;
+
+      default:
+         DbgPrint("Unhandled status: %x", GeneralStatus);
+         break;
+    }
 }
 
 



More information about the Ros-diffs mailing list