5 modified files
reactos/drivers/net/ndis/ndis
diff -u -r1.14 -r1.15
--- main.c 7 Jul 2004 08:39:54 -0000 1.14
+++ main.c 24 Jul 2004 04:48:00 -0000 1.15
@@ -18,7 +18,7 @@
#ifdef DBG
/* See debug.h for debug/trace constants */
-DWORD DebugTraceLevel = 0;
+DWORD DebugTraceLevel = MIN_TRACE;
#endif /* DBG */
reactos/drivers/net/ndis/ndis
diff -u -r1.29 -r1.30
--- miniport.c 22 Jul 2004 18:54:36 -0000 1.29
+++ miniport.c 24 Jul 2004 04:48:00 -0000 1.30
@@ -162,7 +162,8 @@
/* 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",
Adapter, HeaderBuffer, HeaderBufferSize, LookaheadBuffer, LookaheadBufferSize));
@@ -225,6 +226,25 @@
}
#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",
+ *AdapterBinding->ProtocolBinding->Chars.u4.ReceiveHandler,
+ AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
+ MacReceiveContext,
+ HeaderBuffer,
+ HeaderBufferSize,
+ LookaheadBuffer,
+ LookaheadBufferSize,
+ PacketSize));
+
/* call the receive handler */
(*AdapterBinding->ProtocolBinding->Chars.u4.ReceiveHandler)(
AdapterBinding->NdisOpenBlock.ProtocolBindingContext,
@@ -353,7 +373,7 @@
VOID STDCALL
MiniEthReceiveIndication(
- IN PETH_FILTER Filter, /* shouldn't be NDIS_HANDLE? */
+ IN NDIS_HANDLE MiniportAdapter,
IN NDIS_HANDLE MacReceiveContext,
IN PCHAR Address,
IN PVOID HeaderBuffer,
@@ -364,7 +384,7 @@
/*
* FUNCTION: Receive indication function for Ethernet devices
* ARGUMENTS:
- * Filter = Pointer to Ethernet filter
+ * MiniportAdapter = Miniport Adapter Handle (PLOGICAL_ADAPTER)
* MacReceiveContext = MAC receive context handle
* Address = Pointer to destination Ethernet address
* HeaderBuffer = Pointer to Ethernet header buffer
@@ -374,15 +394,13 @@
* PacketSize = Total size of received packet
*/
{
- if( Filter ) {
- MiniIndicateData((PLOGICAL_ADAPTER)Filter->Miniport,
- MacReceiveContext,
- HeaderBuffer,
- HeaderBufferSize,
- LookaheadBuffer,
- LookaheadBufferSize,
- PacketSize);
- }
+ MiniIndicateData(MiniportAdapter,
+ MacReceiveContext,
+ HeaderBuffer,
+ HeaderBufferSize,
+ LookaheadBuffer,
+ LookaheadBufferSize,
+ PacketSize);
}
reactos/drivers/net/dd/ne2000/ne2000
diff -u -r1.5 -r1.6
--- 8390.c 11 May 2004 20:52:09 -0000 1.5
+++ 8390.c 24 Jul 2004 04:48:01 -0000 1.6
@@ -7,7 +7,9 @@
* REVISIONS:
* CSH 27/08-2000 Created
*/
+#include <roscfg.h>
#include <ne2000.h>
+#include <debug.h>
/* Null-terminated array of ports to probe. This is "semi-risky" (Don Becker). */
ULONG ProbeAddressList[] = { 0x280, 0x300, 0x320, 0x340, 0x360, 0x380, 0 };
@@ -921,6 +923,8 @@
#endif
if (IndicateLength >= DRIVER_HEADER_SIZE) {
+ NDIS_DbgPrint(MAX_TRACE,("Adapter->MiniportAdapterHandle: %x\n",
+ Adapter->MiniportAdapterHandle));
NdisMEthIndicateReceive(Adapter->MiniportAdapterHandle,
NULL,
(PVOID)&Adapter->Lookahead,
@@ -974,6 +978,8 @@
/* Skip packet */
Adapter->NextPacket = Adapter->CurrentPage;
} else {
+ NDIS_DbgPrint(MAX_TRACE,("Adapter->MiniportAdapterHandle: %x\n",
+ Adapter->MiniportAdapterHandle));
NICIndicatePacket(Adapter);
/* Go to the next free buffer in receive ring */
@@ -1221,6 +1227,8 @@
} else {
NDIS_DbgPrint(MID_TRACE, ("Got a packet in the receive ring.\n"));
+ NDIS_DbgPrint(MAX_TRACE,("Adapter->MiniportAdapterHandle: %x\n",
+ Adapter->MiniportAdapterHandle));
/* Read packet from receive buffer ring */
NICReadPacket(Adapter);
@@ -1334,7 +1342,12 @@
/* Overflow. Handled almost the same way as a receive interrupt */
Adapter->BufferOverflow = TRUE;
- HandleReceive(Adapter);
+ NDIS_DbgPrint(MAX_TRACE,("Adapter->MiniportAdapterHandle: %x\n",
+ Adapter->MiniportAdapterHandle));
+ if(Adapter->MiniportAdapterHandle)
+ HandleReceive(Adapter);
+ else
+ NDIS_DbgPrint(MAX_TRACE,("No miniport adapter yet\n"));
Adapter->InterruptStatus &= ~ISR_OVW;
break;
@@ -1348,8 +1361,13 @@
case ISR_PRX:
NDIS_DbgPrint(MID_TRACE, ("Receive interrupt.\n"));
- HandleReceive(Adapter);
-
+ NDIS_DbgPrint(MAX_TRACE,("Adapter->MiniportAdapterHandle: %x\n",
+ Adapter->MiniportAdapterHandle));
+ if(Adapter->MiniportAdapterHandle)
+ HandleReceive(Adapter);
+ else
+ NDIS_DbgPrint(MAX_TRACE,("No miniport adapter yet\n"));
+
Adapter->InterruptStatus &= ~(ISR_PRX | ISR_RXE);
break;
reactos/drivers/net/dd/ne2000/ne2000
diff -u -r1.5 -r1.6
--- main.c 11 May 2004 20:52:09 -0000 1.5
+++ main.c 24 Jul 2004 04:48:01 -0000 1.6
@@ -7,7 +7,9 @@
* REVISIONS:
* CSH 27/08-2000 Created
*/
+#include <roscfg.h>
#include <ne2000.h>
+#include <debug.h>
#ifdef DBG
@@ -163,7 +165,7 @@
NDIS_STATUS Status;
PNIC_ADAPTER Adapter;
- NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
+ NDIS_DbgPrint(MAX_TRACE, ("Called (Adapter %X).\n", MiniportAdapterHandle));
/* Search for 802.3 media which is the only one we support */
for (i = 0; i < MediumArraySize; i++) {
reactos/include/net
diff -u -r1.28 -r1.29
--- ndis.h 11 May 2004 20:52:10 -0000 1.28
+++ ndis.h 24 Jul 2004 04:48:01 -0000 1.29
@@ -4452,7 +4452,7 @@
typedef VOID
(STDCALL *ETH_RCV_INDICATE_HANDLER)(
- IN PETH_FILTER Filter,
+ IN NDIS_HANDLE MiniportAdapter,
IN NDIS_HANDLE MacReceiveContext,
IN PCHAR Address,
IN PVOID HeaderBuffer,
@@ -4986,7 +4986,7 @@
PacketSize) \
{ \
(*((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->EthRxIndicateHandler)( \
- (((PNDIS_MINIPORT_BLOCK)(MiniportAdapterHandle))->FilterDbs.u.EthDB), \
+ (MiniportAdapterHandle), \
(MiniportReceiveContext), \
(HeaderBuffer), \
(HeaderBuffer), \
CVSspam 0.2.8