Commit in reactos/drivers/net/tcpip/datalink on MAIN
lan.c+11-21.16 -> 1.17
Change from unclegarlic: Don't overwrite packet length.

reactos/drivers/net/tcpip/datalink
lan.c 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- lan.c	9 Jun 2004 18:11:37 -0000	1.16
+++ lan.c	19 Jun 2004 02:03:33 -0000	1.17
@@ -281,7 +281,7 @@
     PLAN_ADAPTER Adapter = (PLAN_ADAPTER)BindingContext;
     PETH_HEADER EHeader  = (PETH_HEADER)HeaderBuffer;
 
-    TI_DbgPrint(DEBUG_DATALINK, ("Called.\n"));
+    TI_DbgPrint(DEBUG_DATALINK, ("Called. (packetsize %d)\n",PacketSize));
 
     if (Adapter->State != LAN_STATE_STARTED) {
         TI_DbgPrint(DEBUG_DATALINK, ("Adapter is stopped.\n"));
@@ -317,11 +317,17 @@
     KeAcquireSpinLockAtDpcLevel(&Adapter->Lock);
     NdisStatus = AllocatePacketWithBuffer( &NdisPacket, NULL, Adapter->MTU );
     if( NdisStatus != NDIS_STATUS_SUCCESS ) return NDIS_STATUS_NOT_ACCEPTED;
-    GetDataPtr( NdisPacket, 0, &BufferData, &PacketSize );
+    TI_DbgPrint(DEBUG_DATALINK, ("pretransfer LookaheadBufferSize %d packsize %d\n",LookaheadBufferSize,PacketSize));
+	{
+		UINT temp;
+		temp = PacketSize;
+    GetDataPtr( NdisPacket, 0, &BufferData, &temp );
+	}
 
     IPPacket.NdisPacket = NdisPacket;
 	
     if (LookaheadBufferSize < PacketSize) {
+    TI_DbgPrint(DEBUG_DATALINK, ("pretransfer LookaheadBufferSize %d packsize %d\n",LookaheadBufferSize,PacketSize));
         /* Get the data */
         NdisTransferData(&NdisStatus,
                          Adapter->NdisHandle,
@@ -331,6 +337,7 @@
                          NdisPacket,
                          &BytesTransferred);
     } else {
+    TI_DbgPrint(DEBUG_DATALINK, ("copy\n"));
 	NdisStatus = NDIS_STATUS_SUCCESS;
 	BytesTransferred = PacketSize;
 	RtlCopyMemory(BufferData,
@@ -339,6 +346,7 @@
 	RtlCopyMemory(BufferData + HeaderBufferSize,
 		      LookaheadBuffer, LookaheadBufferSize);
     }
+    TI_DbgPrint(DEBUG_DATALINK, ("Calling complete\n"));
 
     if (NdisStatus != NDIS_STATUS_PENDING)
 	ProtocolTransferDataComplete(BindingContext,
@@ -348,6 +356,7 @@
 
     /* Release the packet descriptor */
     KeReleaseSpinLockFromDpcLevel(&Adapter->Lock);
+    TI_DbgPrint(DEBUG_DATALINK, ("leaving\n"));
 
     return NDIS_STATUS_SUCCESS;
 }
CVSspam 0.2.8