mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
- 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 svn path=/trunk/; revision=40673
This commit is contained in:
parent
0f406bf6b8
commit
cfaf89f849
1 changed files with 4 additions and 1 deletions
|
@ -428,6 +428,7 @@ NdisAllocatePacket(
|
|||
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 @@ NdisAllocatePacketPoolEx(
|
|||
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 @@ NdisDprAllocatePacket(
|
|||
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 @@ NdisDprAllocatePacketNonInterlocked(
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue