ReactOS  0.4.14-dev-583-g2a1ba2c
ndis.c File Reference
#include "nic.h"
#include <debug.h>
Include dependency graph for ndis.c:

Go to the source code of this file.

Functions

NDIS_STATUS NTAPI MiniportReset (OUT PBOOLEAN AddressingReset, IN NDIS_HANDLE MiniportAdapterContext)
 
NDIS_STATUS NTAPI MiniportSend (IN NDIS_HANDLE MiniportAdapterContext, IN PNDIS_PACKET Packet, IN UINT Flags)
 
VOID NTAPI MiniportHalt (IN NDIS_HANDLE MiniportAdapterContext)
 
NDIS_STATUS NTAPI MiniportInitialize (OUT PNDIS_STATUS OpenErrorStatus, OUT PUINT SelectedMediumIndex, IN PNDIS_MEDIUM MediumArray, IN UINT MediumArraySize, IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_HANDLE WrapperConfigurationContext)
 
NTSTATUS NTAPI DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 

Variables

ULONG DebugTraceLevel = MIN_TRACE
 

Function Documentation

◆ DriverEntry()

NTSTATUS NTAPI DriverEntry ( IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegistryPath 
)

Definition at line 297 of file ndis.c.

300 {
301  NDIS_HANDLE WrapperHandle;
302  NDIS_MINIPORT_CHARACTERISTICS Characteristics = { 0 };
304 
305  Characteristics.MajorNdisVersion = NDIS_MINIPORT_MAJOR_VERSION;
306  Characteristics.MinorNdisVersion = NDIS_MINIPORT_MINOR_VERSION;
307  Characteristics.CheckForHangHandler = NULL;
308  Characteristics.DisableInterruptHandler = NULL;
309  Characteristics.EnableInterruptHandler = NULL;
310  Characteristics.HaltHandler = MiniportHalt;
311  Characteristics.HandleInterruptHandler = MiniportHandleInterrupt;
312  Characteristics.InitializeHandler = MiniportInitialize;
313  Characteristics.ISRHandler = MiniportISR;
314  Characteristics.QueryInformationHandler = MiniportQueryInformation;
315  Characteristics.ReconfigureHandler = NULL;
316  Characteristics.ResetHandler = MiniportReset;
317  Characteristics.SendHandler = MiniportSend;
318  Characteristics.SetInformationHandler = MiniportSetInformation;
319  Characteristics.TransferDataHandler = NULL;
320  Characteristics.ReturnPacketHandler = NULL;
321  Characteristics.SendPacketsHandler = NULL;
322  Characteristics.AllocateCompleteHandler = NULL;
323 
325  if (!WrapperHandle)
326  {
327  return NDIS_STATUS_FAILURE;
328  }
329 
330  Status = NdisMRegisterMiniport(WrapperHandle, &Characteristics, sizeof(Characteristics));
332  {
333  NdisTerminateWrapper(WrapperHandle, 0);
334  return NDIS_STATUS_FAILURE;
335  }
336 
337  return NDIS_STATUS_SUCCESS;
338 }
VOID NTAPI MiniportISR(OUT PBOOLEAN InterruptRecognized, OUT PBOOLEAN QueueMiniportHandleInterrupt, IN NDIS_HANDLE MiniportAdapterContext)
Definition: interrupt.c:16
NDIS_STATUS NTAPI MiniportReset(OUT PBOOLEAN AddressingReset, IN NDIS_HANDLE MiniportAdapterContext)
Definition: ndis.c:17
int NDIS_STATUS
Definition: ntddndis.h:471
smooth NULL
Definition: ftsmooth.c:416
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
VOID EXPORT NdisTerminateWrapper(IN NDIS_HANDLE NdisWrapperHandle, IN PVOID SystemSpecific)
Definition: miniport.c:3012
VOID NTAPI MiniportHandleInterrupt(IN NDIS_HANDLE MiniportAdapterContext)
Definition: interrupt.c:40
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
NDIS_STATUS NTAPI MiniportInitialize(OUT PNDIS_STATUS OpenErrorStatus, OUT PUINT SelectedMediumIndex, IN PNDIS_MEDIUM MediumArray, IN UINT MediumArraySize, IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_HANDLE WrapperConfigurationContext)
Definition: ndis.c:88
NDIS_STATUS NTAPI MiniportSend(IN NDIS_HANDLE MiniportAdapterContext, IN PNDIS_PACKET Packet, IN UINT Flags)
Definition: ndis.c:28
VOID NTAPI MiniportHalt(IN NDIS_HANDLE MiniportAdapterContext)
Definition: ndis.c:66
Status
Definition: gdiplustypes.h:24
NDIS_STATUS NTAPI MiniportSetInformation(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesRead, OUT PULONG BytesNeeded)
Definition: info.c:232
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
#define NdisMInitializeWrapper(NdisWrapperHandle, SystemSpecific1, SystemSpecific2, SystemSpecific3)
Definition: ndis.h:5592
NDIS_STATUS EXPORT NdisMRegisterMiniport(IN NDIS_HANDLE NdisWrapperHandle, IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics, IN UINT CharacteristicsLength)
Definition: miniport.c:2637
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465
NDIS_STATUS NTAPI MiniportQueryInformation(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesWritten, OUT PULONG BytesNeeded)
Definition: info.c:51

◆ MiniportHalt()

VOID NTAPI MiniportHalt ( IN NDIS_HANDLE  MiniportAdapterContext)

Definition at line 66 of file ndis.c.

68 {
69  PE1000_ADAPTER Adapter = (PE1000_ADAPTER)MiniportAdapterContext;
70 
71  ASSERT(Adapter != NULL);
72 
73  /* First disable sending / receiving */
74  NICDisableTxRx(Adapter);
75 
76  /* Then unregister interrupts */
77  NICUnregisterInterrupts(Adapter);
78 
79  /* Finally, free other resources (Ports, IO ranges,...) */
80  NICReleaseIoResources(Adapter);
81 
82  /* Destroy the adapter context */
83  NdisFreeMemory(Adapter, sizeof(*Adapter), 0);
84 }
struct _E1000_ADAPTER * PE1000_ADAPTER
NDIS_STATUS NTAPI NICUnregisterInterrupts(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:448
smooth NULL
Definition: ftsmooth.c:416
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
NDIS_STATUS NTAPI NICDisableTxRx(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:672
NDIS_STATUS NTAPI NICReleaseIoResources(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:464
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
Definition: memory.c:110

Referenced by DriverEntry(), and MiniportInitialize().

◆ MiniportInitialize()

NDIS_STATUS NTAPI MiniportInitialize ( OUT PNDIS_STATUS  OpenErrorStatus,
OUT PUINT  SelectedMediumIndex,
IN PNDIS_MEDIUM  MediumArray,
IN UINT  MediumArraySize,
IN NDIS_HANDLE  MiniportAdapterHandle,
IN NDIS_HANDLE  WrapperConfigurationContext 
)

Definition at line 88 of file ndis.c.

95 {
96  PE1000_ADAPTER Adapter;
98  UINT i;
100  UINT ResourceListSize;
101  PCI_COMMON_CONFIG PciConfig;
102 
103  /* Make sure the medium is supported */
104  for (i = 0; i < MediumArraySize; i++)
105  {
106  if (MediumArray[i] == NdisMedium802_3)
107  {
109  break;
110  }
111  }
112 
113  if (i == MediumArraySize)
114  {
115  NDIS_DbgPrint(MIN_TRACE, ("802.3 medium was not found in the medium array\n"));
117  }
118 
119  ResourceList = NULL;
120  ResourceListSize = 0;
121 
122  /* Allocate our adapter context */
124  sizeof(*Adapter),
125  E1000_TAG);
127  {
128  NDIS_DbgPrint(MIN_TRACE, ("Failed to allocate adapter context (0x%x)\n", Status));
129  return NDIS_STATUS_RESOURCES;
130  }
131 
132  RtlZeroMemory(Adapter, sizeof(*Adapter));
133  Adapter->AdapterHandle = MiniportAdapterHandle;
134 
135  /* Notify NDIS of some characteristics of our NIC */
137  Adapter,
138  0,
141 
142  NdisReadPciSlotInformation(Adapter->AdapterHandle,
143  0,
144  FIELD_OFFSET(PCI_COMMON_CONFIG, VendorID),
145  &PciConfig, sizeof(PciConfig));
146 
147  Adapter->VendorID = PciConfig.VendorID;
148  Adapter->DeviceID = PciConfig.DeviceID;
149 
150  Adapter->SubsystemID = PciConfig.u.type0.SubSystemID;
151  Adapter->SubsystemVendorID = PciConfig.u.type0.SubVendorID;
152 
153 
154  if (!NICRecognizeHardware(Adapter))
155  {
156  NDIS_DbgPrint(MIN_TRACE, ("Hardware not recognized\n"));
158  goto Cleanup;
159  }
160 
161  /* Get our resources for IRQ and IO base information */
164  ResourceList,
165  &ResourceListSize);
167  {
168  NDIS_DbgPrint(MIN_TRACE, ("Unexpected failure of NdisMQueryAdapterResources (0x%x)\n", Status));
170  /* call NdisWriteErrorLogEntry */
171  goto Cleanup;
172  }
173 
175  ResourceListSize,
176  E1000_TAG);
178  {
179  NDIS_DbgPrint(MIN_TRACE, ("Failed to allocate resource list (0x%x)\n", Status));
180  /* call NdisWriteErrorLogEntry */
181  goto Cleanup;
182  }
183 
186  ResourceList,
187  &ResourceListSize);
189  {
190  NDIS_DbgPrint(MIN_TRACE, ("Unexpected failure of NdisMQueryAdapterResources (0x%x)\n", Status));
191  /* call NdisWriteErrorLogEntry */
192  goto Cleanup;
193  }
194 
195  ASSERT(ResourceList->Version == 1);
196  ASSERT(ResourceList->Revision == 1);
197 
199 
200  NdisFreeMemory(ResourceList, ResourceListSize, 0);
201  ResourceList = NULL;
202 
204  {
205  NDIS_DbgPrint(MIN_TRACE, ("Adapter didn't receive enough resources\n"));
206  goto Cleanup;
207  }
208 
209  /* Allocate the DMA resources */
211  FALSE, // 64bit is supported but can be buggy
214  {
215  NDIS_DbgPrint(MIN_TRACE, ("Unable to configure DMA\n"));
217  goto Cleanup;
218  }
219 
220  Status = NICAllocateIoResources(Adapter);
222  {
223  NDIS_DbgPrint(MIN_TRACE, ("Unable to allocate resources\n"));
225  goto Cleanup;
226  }
227 
228  /* Adapter setup */
229  Status = NICPowerOn(Adapter);
231  {
232  NDIS_DbgPrint(MIN_TRACE, ("Unable to power on NIC (0x%x)\n", Status));
233  goto Cleanup;
234  }
235 
236  Status = NICSoftReset(Adapter);
238  {
239  NDIS_DbgPrint(MIN_TRACE, ("Unable to reset the NIC (0x%x)\n", Status));
240  goto Cleanup;
241  }
242 
243  Status = NICGetPermanentMacAddress(Adapter, Adapter->PermanentMacAddress);
245  {
246  NDIS_DbgPrint(MIN_TRACE, ("Unable to get the fixed MAC address (0x%x)\n", Status));
247  goto Cleanup;
248  }
249 
250  RtlCopyMemory(Adapter->MulticastList[0].MacAddress, Adapter->PermanentMacAddress, IEEE_802_ADDR_LENGTH);
251 
252  NICUpdateMulticastList(Adapter);
253 
254  /* Update link state and speed */
255  NICUpdateLinkStatus(Adapter);
256 
257  /* We're ready to handle interrupts now */
258  Status = NICRegisterInterrupts(Adapter);
260  {
261  NDIS_DbgPrint(MIN_TRACE, ("Unable to register interrupt (0x%x)\n", Status));
262  goto Cleanup;
263  }
264 
265  /* Enable interrupts on the NIC */
266  Adapter->InterruptMask = DEFAULT_INTERRUPT_MASK;
267  Status = NICApplyInterruptMask(Adapter);
269  {
270  NDIS_DbgPrint(MIN_TRACE, ("Unable to apply interrupt mask (0x%x)\n", Status));
271  goto Cleanup;
272  }
273 
274  /* Turn on TX and RX now */
275  Status = NICEnableTxRx(Adapter);
277  {
278  NDIS_DbgPrint(MIN_TRACE, ("Unable to enable TX and RX (0x%x)\n", Status));
279  goto Cleanup;
280  }
281 
282  return NDIS_STATUS_SUCCESS;
283 
284 Cleanup:
285  if (ResourceList != NULL)
286  {
287  NdisFreeMemory(ResourceList, ResourceListSize, 0);
288  }
289 
290  MiniportHalt(Adapter);
291 
292  return Status;
293 }
NDIS_STATUS NTAPI NICSoftReset(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:562
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
VOID EXPORT NdisMQueryAdapterResources(OUT PNDIS_STATUS Status, IN NDIS_HANDLE WrapperConfigurationContext, OUT PNDIS_RESOURCE_LIST ResourceList, IN OUT PUINT BufferSize)
Definition: hardware.c:103
NDIS_STATUS EXPORT NdisAllocateMemoryWithTag(OUT PVOID *VirtualAddress, IN UINT Length, IN ULONG Tag)
Definition: memory.c:21
_In_ NDIS_HANDLE MiniportAdapterHandle
Definition: ndis.h:4668
NDIS_STATUS NTAPI NICAllocateIoResources(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:340
NDIS_STATUS NTAPI NICEnableTxRx(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:605
NDIS_STATUS EXPORT NdisMInitializeScatterGatherDma(IN NDIS_HANDLE MiniportAdapterHandle, IN BOOLEAN Dma64BitAddresses, IN ULONG MaximumPhysicalMapping)
Definition: io.c:1169
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT SelectedMediumIndex
Definition: ndis.h:6008
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT MediumArraySize
Definition: ndis.h:6013
#define NDIS_STATUS_UNSUPPORTED_MEDIA
Definition: ndis.h:490
const MUI_LANGUAGE_RESOURCE ResourceList[]
Definition: muilanguages.h:414
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _In_ NDIS_HANDLE WrapperConfigurationContext
Definition: ndis.h:3944
int NDIS_STATUS
Definition: ntddndis.h:471
NDIS_STATUS NTAPI NICInitializeAdapterResources(IN PE1000_ADAPTER Adapter, IN PNDIS_RESOURCE_LIST ResourceList)
Definition: hardware.c:272
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
VOID NTAPI NICUpdateLinkStatus(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:808
#define NDIS_ATTRIBUTE_BUS_MASTER
Definition: ndis.h:586
#define IEEE_802_ADDR_LENGTH
Definition: e1000hw.h:11
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
NDIS_STATUS NTAPI NICPowerOn(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:540
NDIS_STATUS NTAPI NICRegisterInterrupts(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:423
VOID NTAPI MiniportHalt(IN NDIS_HANDLE MiniportAdapterContext)
Definition: ndis.c:66
NDIS_STATUS NTAPI NICApplyInterruptMask(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:768
static const WCHAR Cleanup[]
Definition: register.c:80
Status
Definition: gdiplustypes.h:24
ULONG EXPORT NdisReadPciSlotInformation(IN NDIS_HANDLE NdisAdapterHandle, IN ULONG SlotNumber, IN ULONG Offset, IN PVOID Buffer, IN ULONG Length)
Definition: hardware.c:180
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define DEFAULT_INTERRUPT_MASK
Definition: nic.h:24
unsigned int UINT
Definition: ndis.h:50
#define NDIS_DbgPrint(_t_, _x_)
Definition: debug.h:40
NDIS_STATUS NTAPI NICUpdateMulticastList(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:722
#define E1000_TAG
Definition: nic.h:17
#define NDIS_STATUS_RESOURCES
Definition: ndis.h:466
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define MIN_TRACE
Definition: debug.h:14
#define MAXIMUM_FRAME_SIZE
Definition: nic.h:19
NDIS_STATUS NTAPI NICGetPermanentMacAddress(IN PE1000_ADAPTER Adapter, OUT PUCHAR MacAddress)
Definition: hardware.c:692
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
Definition: memory.c:110
VOID EXPORT NdisMSetAttributesEx(IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_HANDLE MiniportAdapterContext, IN UINT CheckForHangTimeInSeconds OPTIONAL, IN ULONG AttributeFlags, IN NDIS_INTERFACE_TYPE AdapterType)
Definition: miniport.c:2883
BOOLEAN NTAPI NICRecognizeHardware(IN PE1000_ADAPTER Adapter)
Definition: hardware.c:245

Referenced by DriverEntry(), and PortFdoStartMiniport().

◆ MiniportReset()

NDIS_STATUS NTAPI MiniportReset ( OUT PBOOLEAN  AddressingReset,
IN NDIS_HANDLE  MiniportAdapterContext 
)

Definition at line 17 of file ndis.c.

20 {
21  *AddressingReset = FALSE;
23  return NDIS_STATUS_FAILURE;
24 }
#define UNIMPLEMENTED_DBGBREAK(...)
Definition: debug.h:57
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465

Referenced by DriverEntry().

◆ MiniportSend()

NDIS_STATUS NTAPI MiniportSend ( IN NDIS_HANDLE  MiniportAdapterContext,
IN PNDIS_PACKET  Packet,
IN UINT  Flags 
)

Definition at line 28 of file ndis.c.

32 {
33  PE1000_ADAPTER Adapter = (PE1000_ADAPTER)MiniportAdapterContext;
35  ULONG TransmitLength;
36  PHYSICAL_ADDRESS TransmitBuffer;
38 
39  ASSERT(sgList != NULL);
40  ASSERT(sgList->NumberOfElements == 1);
41  ASSERT((sgList->Elements[0].Address.LowPart & 3) == 0);
42  ASSERT(sgList->Elements[0].Length <= MAXIMUM_FRAME_SIZE);
43 
44  if (Adapter->TxFull)
45  {
46  NDIS_DbgPrint(MIN_TRACE, ("All TX descriptors are full\n"));
47  return NDIS_STATUS_RESOURCES;
48  }
49 
50  TransmitLength = sgList->Elements[0].Length;
51  TransmitBuffer = sgList->Elements[0].Address;
52  Adapter->TransmitPackets[Adapter->CurrentTxDesc] = Packet;
53 
54  Status = NICTransmitPacket(Adapter, TransmitBuffer, TransmitLength);
56  {
57  NDIS_DbgPrint(MIN_TRACE, ("Transmit packet failed\n"));
58  return Status;
59  }
60 
61  return NDIS_STATUS_PENDING;
62 }
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1548
#define NDIS_STATUS_PENDING
Definition: ndis.h:347
struct _E1000_ADAPTER * PE1000_ADAPTER
int NDIS_STATUS
Definition: ntddndis.h:471
smooth NULL
Definition: ftsmooth.c:416
BOOLEAN TxFull
Definition: nic.h:77
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
ULONG CurrentTxDesc
Definition: nic.h:75
PNDIS_PACKET TransmitPackets[NUM_TRANSMIT_DESCRIPTORS]
Definition: nic.h:73
Status
Definition: gdiplustypes.h:24
NDIS_STATUS NTAPI NICTransmitPacket(IN PE1000_ADAPTER Adapter, IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG Length)
Definition: hardware.c:825
#define NDIS_DbgPrint(_t_, _x_)
Definition: debug.h:40
struct _SCATTER_GATHER_LIST * PSCATTER_GATHER_LIST
Definition: iotypes.h:2096
#define NDIS_STATUS_RESOURCES
Definition: ndis.h:466
unsigned int ULONG
Definition: retypes.h:1
#define MIN_TRACE
Definition: debug.h:14
#define MAXIMUM_FRAME_SIZE
Definition: nic.h:19
#define NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, InfoType)
Definition: ndis.h:1351

Referenced by DriverEntry().

Variable Documentation

◆ DebugTraceLevel

ULONG DebugTraceLevel = MIN_TRACE

Definition at line 13 of file ndis.c.