Author: cgutman
Date: Fri Apr 10 23:00:51 2009
New Revision: 40441
URL:
http://svn.reactos.org/svn/reactos?rev=40441&view=rev
Log:
- 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)
Modified:
trunk/reactos/drivers/network/ndis/ndis/miniport.c
trunk/reactos/drivers/network/ndis/ndis/protocol.c
Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Fri Apr 10 23:00:51
2009
@@ -975,7 +975,7 @@
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
{
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] Fri Apr 10 23:00:51
2009
@@ -201,7 +201,7 @@
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 @@
{
(*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
{