Author: cgutman
Date: Fri Apr 24 00:00:36 2009
New Revision: 40673
URL:
http://svn.reactos.org/svn/reactos?rev=40673&view=rev
Log:
- Allocate memory for the OOB area also
- Set the NdisPacketOobOffset in each packet
- Fixes the mysterious packet corruption
- Fixes Realtek 8139 and Intel PRO/1000
Modified:
trunk/reactos/drivers/network/ndis/ndis/buffer.c
Modified: trunk/reactos/drivers/network/ndis/ndis/buffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/buffer.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Fri Apr 24 00:00:36
2009
@@ -428,6 +428,7 @@
Temp->Private.Pool = Pool;
Temp->Private.ValidCounts = TRUE;
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
+ Temp->Private.NdisPacketOobOffset = Pool->PacketLength -
sizeof(NDIS_PACKET_OOB_DATA);
*Packet = Temp;
*Status = NDIS_STATUS_SUCCESS;
@@ -506,7 +507,7 @@
NumberOfDescriptors = 0xffff;
}
- Length = sizeof(NDIS_PACKET) + ProtocolReservedLength;
+ Length = sizeof(NDIS_PACKET) + sizeof(NDIS_PACKET_OOB_DATA) +
ProtocolReservedLength;
Size = sizeof(NDISI_PACKET_POOL) + Length * NumberOfDescriptors;
Pool = ExAllocatePool(NonPagedPool, Size);
@@ -711,6 +712,7 @@
Temp->Private.Pool = Pool;
Temp->Private.ValidCounts = TRUE;
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
+ Temp->Private.NdisPacketOobOffset = Pool->PacketLength -
sizeof(NDIS_PACKET_OOB_DATA);
*Packet = Temp;
*Status = NDIS_STATUS_SUCCESS;
@@ -760,6 +762,7 @@
Temp->Private.Pool = Pool;
Temp->Private.ValidCounts = TRUE;
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
+ Temp->Private.NdisPacketOobOffset = Pool->PacketLength -
sizeof(NDIS_PACKET_OOB_DATA);
*Packet = Temp;
*Status = NDIS_STATUS_SUCCESS;