Author: cgutman
Date: Tue Sep 1 02:15:30 2009
New Revision: 42977
URL:
http://svn.reactos.org/svn/reactos?rev=42977&view=rev
Log:
- Send NetEventBindsComplete when binding has completed (required for the WDK example
ndis protocol driver to work)
Modified:
trunk/reactos/drivers/network/ndis/ndis/protocol.c
Modified: trunk/reactos/drivers/network/ndis/ndis/protocol.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/protocol.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/protocol.c [iso-8859-1] Tue Sep 1 02:15:30
2009
@@ -1034,6 +1034,7 @@
PPROTOCOL_BINDING Protocol;
NTSTATUS NtStatus;
UINT MinSize;
+ PNET_PNP_EVENT PnPEvent;
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
@@ -1100,6 +1101,23 @@
*NdisProtocolHandle = Protocol;
ndisBindMiniportsToProtocol(Status, &Protocol->Chars);
+
+ /* Should we only send this if ndisBindMiniportsToProtocol succeeds? */
+ PnPEvent = ProSetupPnPEvent(NetEventBindsComplete, NULL, 0);
+ if (PnPEvent)
+ {
+ if (Protocol->Chars.PnPEventHandler)
+ {
+ /* We call this with a NULL binding context because it affects all bindings */
+ NtStatus = (*Protocol->Chars.PnPEventHandler)(NULL,
+ PnPEvent);
+
+ /* FIXME: We don't support this yet */
+ ASSERT(NtStatus != NDIS_STATUS_PENDING);
+ }
+
+ ExFreePool(PnPEvent);
+ }
if (*Status == NDIS_STATUS_SUCCESS) {
ExInterlockedInsertTailList(&ProtocolListHead, &Protocol->ListEntry,
&ProtocolListLock);