[NDISUIO]
authorHervé Poussineau <hpoussin@reactos.org>
Fri, 22 Aug 2014 19:13:31 +0000 (19:13 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Fri, 22 Aug 2014 19:13:31 +0000 (19:13 +0000)
Add required PnPEventHandler
CORE-8292

svn path=/trunk/; revision=63916

reactos/drivers/network/ndisuio/main.c
reactos/drivers/network/ndisuio/ndisuio.h
reactos/drivers/network/ndisuio/protocol.c

index 0756777..b95cf35 100644 (file)
@@ -74,6 +74,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
     Chars.MinorNdisVersion = NDIS_MINOR_VERSION;
     Chars.OpenAdapterCompleteHandler = NduOpenAdapterComplete;
     Chars.CloseAdapterCompleteHandler = NduCloseAdapterComplete;
+    Chars.PnPEventHandler = NduNetPnPEvent;
     Chars.SendCompleteHandler = NduSendComplete;
     Chars.TransferDataCompleteHandler = NduTransferDataComplete;
     Chars.ResetCompleteHandler = NduResetComplete;
index 00a3755..e4f3b2d 100644 (file)
@@ -134,6 +134,11 @@ NTAPI
 NduCloseAdapterComplete(NDIS_HANDLE ProtocolBindingContext,
                         NDIS_STATUS Status);
 
+NDIS_STATUS
+NTAPI
+NduNetPnPEvent(NDIS_HANDLE ProtocolBindingContext,
+               PNET_PNP_EVENT NetPnPEvent);
+
 VOID
 NTAPI
 NduSendComplete(NDIS_HANDLE ProtocolBindingContext,
index 76417b7..1eaa46b 100644 (file)
@@ -40,6 +40,25 @@ NduCloseAdapterComplete(NDIS_HANDLE ProtocolBindingContext,
     KeSetEvent(&AdapterContext->AsyncEvent, IO_NO_INCREMENT, FALSE);
 }
 
+NDIS_STATUS
+NTAPI
+NduNetPnPEvent(NDIS_HANDLE ProtocolBindingContext,
+               PNET_PNP_EVENT NetPnPEvent)
+{
+    DPRINT("NetPnPEvent\n");
+
+    switch (NetPnPEvent->NetEvent)
+    {
+        case NetEventQueryRemoveDevice:
+            /* Nothing to do */
+            return NDIS_STATUS_SUCCESS;
+
+        default:
+            DPRINT1("NetPnPEvent unimplemented for net event 0x%x\n", NetPnPEvent->NetEvent);
+            return NDIS_STATUS_FAILURE;
+    }
+}
+
 VOID
 NTAPI
 NduSendComplete(NDIS_HANDLE ProtocolBindingContext,