Author: tkreuzer
Date: Sat May 23 15:40:44 2009
New Revision: 41071
URL:
http://svn.reactos.org/svn/reactos?rev=41071&view=rev
Log:
ndis.h: Fix definition of NdisQueryPacketLength
Modified:
branches/ros-amd64-bringup/reactos/include/ddk/ndis.h
Modified: branches/ros-amd64-bringup/reactos/include/ddk/ndis.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
==============================================================================
--- branches/ros-amd64-bringup/reactos/include/ddk/ndis.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/include/ddk/ndis.h [iso-8859-1] Sat May 23 15:40:44
2009
@@ -1997,34 +1997,10 @@
#define NdisQueryPacketLength(Packet, \
TotalPacketLength) \
{ \
- if ((TotalPacketLength)) \
- { \
- if (!(Packet)->Private.ValidCounts) { \
- UINT _Offset; \
- UINT _PacketLength; \
- PNDIS_BUFFER _NdisBuffer; \
- UINT _PhysicalBufferCount = 0; \
- UINT _TotalPacketLength = 0; \
- UINT _Count = 0; \
- \
- for (_NdisBuffer = (Packet)->Private.Head; \
- _NdisBuffer != (PNDIS_BUFFER)NULL; \
- _NdisBuffer = _NdisBuffer->Next) \
- { \
- _PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(_NdisBuffer); \
- NdisQueryBufferOffset(_NdisBuffer, &_Offset, &_PacketLength); \
- _TotalPacketLength += _PacketLength; \
- _Count++; \
- } \
- (Packet)->Private.PhysicalCount = _PhysicalBufferCount; \
- (Packet)->Private.TotalLength = _TotalPacketLength; \
- (Packet)->Private.Count = _Count; \
- (Packet)->Private.ValidCounts = TRUE; \
- } \
- \
- if (TotalPacketLength) \
- *((PUINT)TotalPacketLength) = (Packet)->Private.TotalLength; \
- } \
+ if (!(Packet)->Private.ValidCounts) \
+ NdisQueryPacket(Packet, NULL, NULL, NULL, TotalPacketLength); \
+ else \
+ *(TotalPacketLength) = (Packet)->Private.TotalLength; \
}