Commit in reactos/drivers/net/ndis on MAIN
Makefile+2-21.19 -> 1.20
ndis/main.c+2-11.15 -> 1.16
    /miniport.c+8-141.30 -> 1.31
    /protocol.c+11.18 -> 1.19
+13-17
4 modified files
Fixed includes so that DBG keys on roscfg.h
Fixed subtle bug in miniport.c: if exactly one protocol is registered we 
would skip it in MiniIndicateData because we took the .Flink value from the
list head, then compared CurrentEntry->Flink to the list head address.

reactos/drivers/net/ndis
Makefile 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- Makefile	14 Nov 2003 17:13:28 -0000	1.19
+++ Makefile	29 Jul 2004 05:00:43 -0000	1.20
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.19 2003/11/14 17:13:28 weiden Exp $
+# $Id: Makefile,v 1.20 2004/07/29 05:00:43 arty Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -6,7 +6,7 @@
 
 TARGET_NAME = ndis
 
-TARGET_CFLAGS = -I./include -DNDIS_WRAPPER -DDBG=1 -Wall -Werror
+TARGET_CFLAGS = -I./include -DNDIS_WRAPPER -Wall -Werror
 
 TARGET_OBJECTS = \
   ndis/main.o \

reactos/drivers/net/ndis/ndis
main.c 1.15 -> 1.16
diff -u -r1.15 -r1.16
--- main.c	24 Jul 2004 04:48:00 -0000	1.15
+++ main.c	29 Jul 2004 05:00:43 -0000	1.16
@@ -10,6 +10,7 @@
  *   20 Aug 2003 Vizzini - NDIS4/5 revisions
  *   3  Oct 2003 Vizzini - formatting and minor bugfixing
  */
+#include <roscfg.h>
 #include <ndissys.h>
 #include <protocol.h>
 #include <miniport.h>
@@ -104,7 +105,7 @@
  */
 {
   NDIS_DbgPrint(MIN_TRACE, ("ERROR: ErrorCode 0x%x\n", ErrorCode));
-  ASSERT(0);
+  /* ASSERT(0); */
 }
 
 

reactos/drivers/net/ndis/ndis
miniport.c 1.30 -> 1.31
diff -u -r1.30 -r1.31
--- miniport.c	24 Jul 2004 04:48:00 -0000	1.30
+++ miniport.c	29 Jul 2004 05:00:43 -0000	1.31
@@ -10,6 +10,7 @@
  *   20 Aug 2003 vizzini - DMA support
  *   3  Oct 2003 vizzini - SendPackets support
  */
+#include <roscfg.h>
 #include <miniport.h>
 #include <protocol.h>
 
@@ -105,8 +106,7 @@
     PVOID  LookaheadBuffer,
     UINT   LookaheadBufferSize)
 {
-//#ifdef DBG
-#if 0
+#ifdef DBG
     if ((DebugTraceLevel | DEBUG_PACKET) > 0) {
         ULONG i, Length;
         PUCHAR p;
@@ -162,7 +162,6 @@
   /* KIRQL OldIrql; */
   PLIST_ENTRY CurrentEntry;
   PADAPTER_BINDING AdapterBinding;
-  static PVOID ReceiveHandler = 0;
   
   NDIS_DbgPrint(DEBUG_MINIPORT, ("Called. Adapter (0x%X)  HeaderBuffer (0x%X)  "
       "HeaderBufferSize (0x%X)  LookaheadBuffer (0x%X)  LookaheadBufferSize (0x%X).\n",
@@ -193,20 +192,22 @@
   //KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
     {
       CurrentEntry = Adapter->ProtocolListHead.Flink;
+      NDIS_DbgPrint(DEBUG_MINIPORT, ("CurrentEntry = %x\n", CurrentEntry));
 
       if (CurrentEntry == &Adapter->ProtocolListHead) 
         {
           NDIS_DbgPrint(DEBUG_MINIPORT, ("WARNING: No upper protocol layer.\n"));
         }
 
-      while (CurrentEntry->Flink != &Adapter->ProtocolListHead) 
+      while (CurrentEntry != &Adapter->ProtocolListHead) 
         {
           AdapterBinding = CONTAINING_RECORD(CurrentEntry, ADAPTER_BINDING, AdapterListEntry);
+	  NDIS_DbgPrint(DEBUG_MINIPORT, ("AdapterBinding = %x\n", AdapterBinding));
 
           /* see above */
           /* KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql); */
 
-#if DBG
+#ifdef DBG
           if(!AdapterBinding)
             {
               NDIS_DbgPrint(MIN_TRACE, ("AdapterBinding was null\n"));
@@ -226,13 +227,6 @@
             }
 #endif
 
-	  if( !ReceiveHandler ) 
-	      ReceiveHandler = 
-		  *AdapterBinding->ProtocolBinding->Chars.u4.ReceiveHandler;
-	  ASSERT( ReceiveHandler ==
-		  *AdapterBinding->ProtocolBinding->Chars.u4.ReceiveHandler );
-	      
-
 	  NDIS_DbgPrint
 	      (MID_TRACE, 
 	       ("XXX (%x) %x %x %x %x %x %x %x XXX\n",
@@ -319,7 +313,7 @@
 
       NDIS_DbgPrint(MID_TRACE, ("indicating a %d-byte packet\n", PacketLength));
 
-      MiniIndicateData(Miniport, 0, PacketBuffer, 14, PacketBuffer+14, PacketLength-14, PacketLength-14);
+      MiniIndicateData(Miniport, NULL, PacketBuffer, 14, PacketBuffer+14, PacketLength-14, PacketLength-14);
 
       NdisFreeMemory(PacketBuffer, 0, 0);
     }
@@ -490,7 +484,7 @@
 
   NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
 
-#if DBG
+#ifdef DBG
   if(!Adapter)
     {
       NDIS_DbgPrint(MID_TRACE, ("Adapter object was null\n"));

reactos/drivers/net/ndis/ndis
protocol.c 1.18 -> 1.19
diff -u -r1.18 -r1.19
--- protocol.c	22 Jul 2004 18:54:36 -0000	1.18
+++ protocol.c	29 Jul 2004 05:00:43 -0000	1.19
@@ -9,6 +9,7 @@
  *   CSH 01/08-2000 Created
  *   09-13-2003 Vizzini Updates for SendPackets support
  */
+#include <roscfg.h>
 #include <ndissys.h>
 #include <miniport.h>
 #include <protocol.h>
CVSspam 0.2.8