[NDIS] Enforce '#if DBG' around MiniDisplayPacket[2]()

Also add 'static' on MiniDisplayPacket2().
This commit is contained in:
Serge Gautherie 2019-06-08 03:03:40 +02:00 committed by Mark Jansen
parent 84e162e669
commit 68bcc2df7c
2 changed files with 7 additions and 4 deletions

View file

@ -57,12 +57,12 @@ KSPIN_LOCK MiniportListLock;
LIST_ENTRY AdapterListHead;
KSPIN_LOCK AdapterListLock;
#if DBG
VOID
MiniDisplayPacket(
PNDIS_PACKET Packet,
PCSTR Reason)
{
#if DBG
ULONG i, Length;
UCHAR Buffer[64];
if ((DebugTraceLevel & DEBUG_PACKET) > 0) {
@ -82,9 +82,9 @@ MiniDisplayPacket(
DbgPrint("\n*** %s PACKET STOP ***\n", Reason);
}
#endif /* DBG */
}
static
VOID
MiniDisplayPacket2(
PVOID HeaderBuffer,
@ -92,7 +92,6 @@ MiniDisplayPacket2(
PVOID LookaheadBuffer,
UINT LookaheadBufferSize)
{
#if DBG
if ((DebugTraceLevel & DEBUG_PACKET) > 0) {
ULONG i, Length;
PUCHAR p;
@ -118,8 +117,8 @@ MiniDisplayPacket2(
DbgPrint("\n*** RECEIVE PACKET STOP ***\n");
}
#endif /* DBG */
}
#endif /* DBG */
PNDIS_MINIPORT_WORK_ITEM
MiniGetFirstWorkItem(
@ -201,7 +200,9 @@ MiniIndicateData(
"HeaderBufferSize (0x%X) LookaheadBuffer (0x%X) LookaheadBufferSize (0x%X).\n",
Adapter, HeaderBuffer, HeaderBufferSize, LookaheadBuffer, LookaheadBufferSize));
#if DBG
MiniDisplayPacket2(HeaderBuffer, HeaderBufferSize, LookaheadBuffer, LookaheadBufferSize);
#endif
NDIS_DbgPrint(MAX_TRACE, ("acquiring miniport block lock\n"));
KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);

View file

@ -404,7 +404,9 @@ proSendPacketToMiniport(PLOGICAL_ADAPTER Adapter, PNDIS_PACKET Packet)
return NDIS_STATUS_PENDING;
}
#if DBG
MiniDisplayPacket(Packet, "SEND");
#endif
if(Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.SendPacketsHandler)
{