Author: cgutman
Date: Sat Sep 13 11:40:45 2008
New Revision: 36192
URL:
http://svn.reactos.org/svn/reactos?rev=36192&view=rev
Log:
- Implement NdisDprFreePacket
- Implement NdisDprFreePacketNonInterlocked
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep
13 11:40:45 2008
@@ -791,7 +791,7 @@
/*
- * @unimplemented
+ * @implemented
*/
VOID
EXPORT
@@ -803,11 +803,17 @@
* Packet = Pointer to packet to free
*/
{
-}
-
-
-/*
- * @unimplemented
+ NDIS_DbgPrint(MAX_TRACE, ("Packet (0x%X).\n", Packet));
+
+
KeAcquireSpinLockAtDpcLevel(&((NDISI_PACKET_POOL*)Packet->Private.Pool)->SpinLock.SpinLock);
+ Packet->Private.Head =
(PNDIS_BUFFER)((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList;
+ ((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList = Packet;
+
KeReleaseSpinLockFromDpcLevel(&((NDISI_PACKET_POOL*)Packet->Private.Pool)->SpinLock.SpinLock);
+}
+
+
+/*
+ * @implemented
*/
VOID
EXPORT
@@ -819,6 +825,10 @@
* Packet = Pointer to packet to free
*/
{
+ NDIS_DbgPrint(MAX_TRACE, ("Packet (0x%X).\n", Packet));
+
+ Packet->Private.Head =
(PNDIS_BUFFER)((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList;
+ ((NDISI_PACKET_POOL*)Packet->Private.Pool)->FreeList = Packet;
}