mirror of
https://github.com/reactos/reactos.git
synced 2024-08-29 14:48:37 +00:00
- Deserialized miniports always complete their sends asynchronously so we return NDIS_STATUS_PENDING when we call one (so the ProtocolSendComplete handler doesn't get called twice thus double-completing the packet)
- Fixes miniport drivers that use a deserialized SendPackets handler (including the rtl8139) - The rtl8139 driver still doesn't work (likely due to a bug in tcpip) svn path=/trunk/; revision=40441
This commit is contained in:
parent
f6da61467d
commit
15cbc1d92d
|
@ -975,7 +975,7 @@ MiniportWorker(IN PDEVICE_OBJECT DeviceObject, IN PVOID Context)
|
|||
NDIS_DbgPrint(MAX_TRACE, ("Calling miniport's SendPackets handler\n"));
|
||||
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.SendPacketsHandler)(
|
||||
Adapter->NdisMiniportBlock.MiniportAdapterContext, (PPNDIS_PACKET)&WorkItemContext, 1);
|
||||
NdisStatus = NDIS_GET_PACKET_STATUS((PNDIS_PACKET)WorkItemContext);
|
||||
NdisStatus = NDIS_STATUS_PENDING;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -201,7 +201,7 @@ proSendPacketToMiniport(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet)
|
|||
NDIS_DbgPrint(MAX_TRACE, ("Calling miniport's SendPackets handler\n"));
|
||||
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.SendPacketsHandler)(
|
||||
Adapter->NdisMiniportBlock.MiniportAdapterContext, &Packet, 1);
|
||||
NdisStatus = NDIS_GET_PACKET_STATUS(Packet);
|
||||
NdisStatus = NDIS_STATUS_PENDING;
|
||||
} else {
|
||||
/* SendPackets is called at DISPATCH_LEVEL for all serialized miniports */
|
||||
KeRaiseIrql(DISPATCH_LEVEL, &RaiseOldIrql);
|
||||
|
@ -322,12 +322,6 @@ ProSendPackets(
|
|||
{
|
||||
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.SendPacketsHandler)(
|
||||
Adapter->NdisMiniportBlock.MiniportAdapterContext, PacketArray, NumberOfPackets);
|
||||
for (i = 0; i < NumberOfPackets; i++)
|
||||
{
|
||||
NdisStatus = NDIS_GET_PACKET_STATUS(PacketArray[i]);
|
||||
if (NdisStatus != NDIS_STATUS_PENDING)
|
||||
MiniSendComplete(Adapter, PacketArray[i], NdisStatus);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue