Author: cgutman
Date: Wed May 6 02:24:26 2009
New Revision: 40803
URL:
http://svn.reactos.org/svn/reactos?rev=40803&view=rev
Log:
- Add and register a ProtocolPnPEvent handler with some stubs in it
Modified:
trunk/reactos/drivers/network/tcpip/datalink/lan.c
Modified: trunk/reactos/drivers/network/tcpip/datalink/lan.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/data…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/datalink/lan.c [iso-8859-1] Wed May 6 02:24:26
2009
@@ -514,6 +514,34 @@
}
}
+NDIS_STATUS NTAPI
+ProtocolPnPEvent(
+ NDIS_HANDLE NdisBindingContext,
+ PNET_PNP_EVENT PnPEvent)
+{
+ switch(PnPEvent->NetEvent)
+ {
+ case NetEventSetPower:
+ DbgPrint("Device transitioned to power state %ld\n",
PnPEvent->Buffer);
+ return NDIS_STATUS_SUCCESS;
+
+ case NetEventQueryPower:
+ DbgPrint("Device wants to go into power state %ld\n",
PnPEvent->Buffer);
+ return NDIS_STATUS_SUCCESS;
+
+ case NetEventQueryRemoveDevice:
+ DbgPrint("Device is about to be removed\n");
+ return NDIS_STATUS_SUCCESS;
+
+ case NetEventCancelRemoveDevice:
+ DbgPrint("Device removal cancelled\n");
+ return NDIS_STATUS_SUCCESS;
+
+ default:
+ DbgPrint("Unhandled event type: %ld\n", PnPEvent->NetEvent);
+ return NDIS_STATUS_SUCCESS;
+ }
+}
VOID NTAPI ProtocolStatusComplete(
NDIS_HANDLE NdisBindingContext)
@@ -1275,6 +1303,7 @@
ProtChars.StatusHandler = ProtocolStatus;
ProtChars.StatusCompleteHandler = ProtocolStatusComplete;
ProtChars.BindAdapterHandler = ProtocolBindAdapter;
+ ProtChars.PnPEventHandler = ProtocolPnPEvent;
/* Try to register protocol */
NdisRegisterProtocol(&NdisStatus,