mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 18:02:05 +00:00
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. svn path=/trunk/; revision=10307
This commit is contained in:
parent
c14c59021f
commit
bc0ec8c03d
4 changed files with 13 additions and 17 deletions
|
@ -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_TYPE = export_driver
|
|||
|
||||
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 \
|
||||
|
|
|
@ -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 @@ NdisWriteErrorLogEntry(
|
|||
*/
|
||||
{
|
||||
NDIS_DbgPrint(MIN_TRACE, ("ERROR: ErrorCode 0x%x\n", ErrorCode));
|
||||
ASSERT(0);
|
||||
/* ASSERT(0); */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 @@ MiniDisplayPacket2(
|
|||
PVOID LookaheadBuffer,
|
||||
UINT LookaheadBufferSize)
|
||||
{
|
||||
//#ifdef DBG
|
||||
#if 0
|
||||
#ifdef DBG
|
||||
if ((DebugTraceLevel | DEBUG_PACKET) > 0) {
|
||||
ULONG i, Length;
|
||||
PUCHAR p;
|
||||
|
@ -162,7 +162,6 @@ MiniIndicateData(
|
|||
/* 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 @@ MiniIndicateData(
|
|||
//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 @@ MiniIndicateData(
|
|||
}
|
||||
#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 @@ MiniIndicateReceivePacket(
|
|||
|
||||
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 @@ MiniAdapterHasAddress(
|
|||
|
||||
NDIS_DbgPrint(DEBUG_MINIPORT, ("Called.\n"));
|
||||
|
||||
#if DBG
|
||||
#ifdef DBG
|
||||
if(!Adapter)
|
||||
{
|
||||
NDIS_DbgPrint(MID_TRACE, ("Adapter object was null\n"));
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue