mirror of
https://github.com/reactos/reactos.git
synced 2024-07-07 13:15:07 +00:00
[NDIS]
- Refresh the protocol bindings after a new miniport is added - Adapters added after boot work now - One step closer to Live CD networking svn path=/trunk/; revision=48193
This commit is contained in:
parent
135986ec2e
commit
92d6d7210c
|
@ -69,4 +69,8 @@ NdisIPnPCancelStopDevice(
|
||||||
NDIS_STATUS
|
NDIS_STATUS
|
||||||
proSendPacketToMiniport(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet);
|
proSendPacketToMiniport(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
ndisBindMiniportsToProtocol(OUT PNDIS_STATUS Status, IN PNDIS_PROTOCOL_CHARACTERISTICS ProtocolCharacteristics);
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1778,6 +1778,8 @@ NdisIPnPStartDevice(
|
||||||
LARGE_INTEGER Timeout;
|
LARGE_INTEGER Timeout;
|
||||||
UINT MaxMulticastAddresses;
|
UINT MaxMulticastAddresses;
|
||||||
ULONG BytesWritten;
|
ULONG BytesWritten;
|
||||||
|
PLIST_ENTRY CurrentEntry;
|
||||||
|
PPROTOCOL_BINDING ProtocolBinding;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prepare wrapper context used by HW and configuration routines.
|
* Prepare wrapper context used by HW and configuration routines.
|
||||||
|
@ -2056,6 +2058,17 @@ NdisIPnPStartDevice(
|
||||||
/* Put adapter in adapter list for this miniport */
|
/* Put adapter in adapter list for this miniport */
|
||||||
ExInterlockedInsertTailList(&Adapter->NdisMiniportBlock.DriverHandle->DeviceList, &Adapter->MiniportListEntry, &Adapter->NdisMiniportBlock.DriverHandle->Lock);
|
ExInterlockedInsertTailList(&Adapter->NdisMiniportBlock.DriverHandle->DeviceList, &Adapter->MiniportListEntry, &Adapter->NdisMiniportBlock.DriverHandle->Lock);
|
||||||
|
|
||||||
|
/* Refresh bindings for all protocols */
|
||||||
|
CurrentEntry = ProtocolListHead.Flink;
|
||||||
|
while (CurrentEntry != &ProtocolListHead)
|
||||||
|
{
|
||||||
|
ProtocolBinding = CONTAINING_RECORD(CurrentEntry, PROTOCOL_BINDING, ListEntry);
|
||||||
|
|
||||||
|
ndisBindMiniportsToProtocol(&NdisStatus, &ProtocolBinding->Chars);
|
||||||
|
|
||||||
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
|
}
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1002,7 +1002,10 @@ ndisBindMiniportsToProtocol(OUT PNDIS_STATUS Status, IN PNDIS_PROTOCOL_CHARACTER
|
||||||
{
|
{
|
||||||
BIND_HANDLER BindHandler = ProtocolCharacteristics->BindAdapterHandler;
|
BIND_HANDLER BindHandler = ProtocolCharacteristics->BindAdapterHandler;
|
||||||
if(BindHandler)
|
if(BindHandler)
|
||||||
|
{
|
||||||
BindHandler(Status, BindContext, &DeviceName, &RegistryPath, 0);
|
BindHandler(Status, BindContext, &DeviceName, &RegistryPath, 0);
|
||||||
|
NDIS_DbgPrint(MIN_TRACE, ("%wZ's BindAdapter handler returned 0x%x for %wZ\n", &ProtocolCharacteristics->Name, *Status, &DeviceName));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
NDIS_DbgPrint(MIN_TRACE, ("No protocol bind handler specified\n"));
|
NDIS_DbgPrint(MIN_TRACE, ("No protocol bind handler specified\n"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue