mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 08:30:21 +00:00
- Zero the whole packet in other packet allocation routines
- Set ValidCount TRUE because we don't have any buffers chained yet - Set the fPACKET_ALLOCATED_BY_NDIS flag (fixes storing media-specific data) svn path=/trunk/; revision=40664
This commit is contained in:
parent
197a0b05ce
commit
0152087f27
1 changed files with 9 additions and 3 deletions
|
@ -426,6 +426,8 @@ NdisAllocatePacket(
|
||||||
|
|
||||||
RtlZeroMemory(Temp, sizeof(NDIS_PACKET));
|
RtlZeroMemory(Temp, sizeof(NDIS_PACKET));
|
||||||
Temp->Private.Pool = Pool;
|
Temp->Private.Pool = Pool;
|
||||||
|
Temp->Private.ValidCounts = TRUE;
|
||||||
|
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
||||||
|
|
||||||
*Packet = Temp;
|
*Packet = Temp;
|
||||||
*Status = NDIS_STATUS_SUCCESS;
|
*Status = NDIS_STATUS_SUCCESS;
|
||||||
|
@ -705,8 +707,10 @@ NdisDprAllocatePacket(
|
||||||
|
|
||||||
KeReleaseSpinLockFromDpcLevel(&Pool->SpinLock.SpinLock);
|
KeReleaseSpinLockFromDpcLevel(&Pool->SpinLock.SpinLock);
|
||||||
|
|
||||||
RtlZeroMemory(&Temp->Private, sizeof(NDIS_PACKET_PRIVATE));
|
RtlZeroMemory(Temp, sizeof(NDIS_PACKET));
|
||||||
Temp->Private.Pool = Pool;
|
Temp->Private.Pool = Pool;
|
||||||
|
Temp->Private.ValidCounts = TRUE;
|
||||||
|
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
||||||
|
|
||||||
*Packet = Temp;
|
*Packet = Temp;
|
||||||
*Status = NDIS_STATUS_SUCCESS;
|
*Status = NDIS_STATUS_SUCCESS;
|
||||||
|
@ -752,8 +756,10 @@ NdisDprAllocatePacketNonInterlocked(
|
||||||
Temp = Pool->FreeList;
|
Temp = Pool->FreeList;
|
||||||
Pool->FreeList = (PNDIS_PACKET)Temp->Reserved[0];
|
Pool->FreeList = (PNDIS_PACKET)Temp->Reserved[0];
|
||||||
|
|
||||||
RtlZeroMemory(&Temp->Private, sizeof(NDIS_PACKET_PRIVATE));
|
RtlZeroMemory(Temp, sizeof(NDIS_PACKET));
|
||||||
Temp->Private.Pool = Pool;
|
Temp->Private.Pool = Pool;
|
||||||
|
Temp->Private.ValidCounts = TRUE;
|
||||||
|
Temp->Private.NdisPacketFlags = fPACKET_ALLOCATED_BY_NDIS;
|
||||||
|
|
||||||
*Packet = Temp;
|
*Packet = Temp;
|
||||||
*Status = NDIS_STATUS_SUCCESS;
|
*Status = NDIS_STATUS_SUCCESS;
|
||||||
|
@ -1102,4 +1108,4 @@ NdisUnchainBufferAtFront(
|
||||||
*Buffer = NdisBuffer;
|
*Buffer = NdisBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
Loading…
Reference in a new issue