From b464adfcbe63d16f5fb2de3413841a8886e372d2 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 1 Sep 2009 00:15:30 +0000 Subject: [PATCH] - Send NetEventBindsComplete when binding has completed (required for the WDK example ndis protocol driver to work) svn path=/trunk/; revision=42977 --- reactos/drivers/network/ndis/ndis/protocol.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/reactos/drivers/network/ndis/ndis/protocol.c b/reactos/drivers/network/ndis/ndis/protocol.c index 08f794e38fc..c72effa318a 100644 --- a/reactos/drivers/network/ndis/ndis/protocol.c +++ b/reactos/drivers/network/ndis/ndis/protocol.c @@ -1034,6 +1034,7 @@ NdisRegisterProtocol( PPROTOCOL_BINDING Protocol; NTSTATUS NtStatus; UINT MinSize; + PNET_PNP_EVENT PnPEvent; NDIS_DbgPrint(MAX_TRACE, ("Called.\n")); @@ -1101,6 +1102,23 @@ NdisRegisterProtocol( 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); } else {