ReactOS 0.4.16-dev-320-g3bd9ddc
ParaNdis5-Driver.c
Go to the documentation of this file.
1/*
2 * This file contains driver-related part of NDIS5.X adapter driver.
3 *
4 * Copyright (c) 2008-2017 Red Hat, Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met :
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and / or other materials provided with the distribution.
14 * 3. Neither the names of the copyright holders nor the names of their contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29#include "ParaNdis5.h"
30
31//#define NO_XP_POWER_MANAGEMENT
32
33#ifdef WPP_EVENT_TRACING
34#include "ParaNdis5-Driver.tmh"
35#endif
36
38static ULONG gID = 0;
39
40/******************************************************
41Unload handler, only responsibility is cleanup WPP
42*******************************************************/
44{
45 DEBUG_ENTRY(0);
46 ParaNdis_DebugCleanup(pDriverObject);
47}
48
49/*************************************************************
50Required NDIS function
51Responsible to put the adapter to known (initial) hardware state
52
53Do not call any NDIS functions
54*************************************************************/
55static VOID NTAPI ParaNdis5_Shutdown(IN NDIS_HANDLE MiniportAdapterContext)
56{
57 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportAdapterContext;
58 ParaNdis_OnShutdown(pContext);
59}
60
61/******************************************************
62Required NDIS procedure
63Allocates and initializes adapter context
64Finally sets send and receive to Enabled state and reports connect
65Returns:
66NDIS_STATUS SUCCESS or some error code
67*******************************************************/
70 IN PNDIS_MEDIUM MediumArray,
74{
76 PARANDIS_ADAPTER *pContext = NULL;
77 UINT i;
78 for(i = 0; i < MediumArraySize; ++i)
79 {
80 if(MediumArray[i] == NdisMedium802_3)
81 {
84 break;
85 }
86 }
87
89 {
90 pContext =
92 if (!pContext)
93 {
95 }
96 }
97
99 {
100 PVOID pResourceList = &status;
101 UINT uSize = 0;
102 NdisZeroMemory(pContext, sizeof(PARANDIS_ADAPTER));
104 pContext->DriverHandle = DriverHandle;
108 if (uSize > 0)
109 pResourceList = ParaNdis_AllocateMemory(MiniportAdapterHandle, uSize);
110 else
111 pResourceList = NULL;
112 if (!pResourceList)
114 else
115 {
116 ULONG attributes;
118 // in XP SP2, if this flag is NOT set, the NDIS halts miniport
119 // upon transition to S1..S4.
120 // it seems that XP SP3 ignores it and always sends SET_POWER to D3
121#ifndef NO_XP_POWER_MANAGEMENT
123#endif
126 pContext,
127 0,
128 attributes,
131 status = ParaNdis_InitializeContext(pContext, (PNDIS_RESOURCE_LIST)pResourceList);
132 NdisFreeMemory(pResourceList, 0, 0);
133 }
134 }
135
137 {
140 {
143 ParaNdis5_StopSend(pContext, FALSE, NULL);
144 ParaNdis5_StopReceive(pContext, FALSE, NULL);
145 if (!pContext->ulMilliesToConnect)
146 {
148 }
149 else
150 {
151 NdisSetTimer(&pContext->ConnectTimer, pContext->ulMilliesToConnect);
152 }
153 }
154 else
155 {
156 ParaNdis_CleanupContext(pContext);
157 }
158 }
159
160 if (status != NDIS_STATUS_SUCCESS && pContext)
161 {
162 NdisFreeMemory(pContext, 0, 0);
163 }
164
166 return status;
167}
168
169
170/*************************************************************
171Callback of delayed receive pause procedure upon reset request
172*************************************************************/
174{
175 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)p;
176 DEBUG_ENTRY(0);
177 NdisSetEvent(&pContext->ResetEvent);
178}
179
180/*************************************************************
181Callback of delayed send pause procedure upon reset request
182*************************************************************/
184{
185 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)p;
186 DEBUG_ENTRY(0);
187 NdisSetEvent(&pContext->ResetEvent);
188}
189
191{
192 DEBUG_ENTRY(0);
193 NdisResetEvent(&pContext->ResetEvent);
195 {
196 NdisSetEvent(&pContext->ResetEvent);
197 }
198 NdisWaitEvent(&pContext->ResetEvent, 0);
199 NdisResetEvent(&pContext->ResetEvent);
201 {
202 NdisSetEvent(&pContext->ResetEvent);
203 }
204 NdisWaitEvent(&pContext->ResetEvent, 0);
205 NdisResetEvent(&pContext->ResetEvent);
206 DEBUG_EXIT_STATUS(0, 0);
207}
208
210{
211 ParaNdis5_StopSend(pContext, FALSE, NULL);
212 ParaNdis5_StopReceive(pContext, FALSE, NULL);
213 DEBUG_EXIT_STATUS(0, 0);
214}
215
217{
218 tGeneralWorkItem *pwi = (tGeneralWorkItem *)pWorkItem;
219 PARANDIS_ADAPTER *pContext = pwi->pContext;
220 DEBUG_ENTRY(0);
221
222 pContext->bResetInProgress = TRUE;
224 ParaNdis_Suspend(pContext);
225 ParaNdis_Resume(pContext);
226 pContext->bResetInProgress = FALSE;
228
229 NdisFreeMemory(pwi, 0, 0);
232}
233
234
235/*************************************************************
236Required NDIS procedure
237Called when some procedure (like OID handler) returns PENDING and
238does not complete or when CheckForHang return TRUE
239*************************************************************/
241 OUT PBOOLEAN AddressingReset,
242 IN NDIS_HANDLE MiniportAdapterContext)
243{
245 tGeneralWorkItem *pwi;
246 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportAdapterContext;
247 DEBUG_ENTRY(0);
248 ParaNdis_DebugHistory(pContext, hopSysReset, NULL, 1, 0, 0);
250 pwi = ParaNdis_AllocateMemory(pContext, sizeof(tGeneralWorkItem));
251 if (pwi)
252 {
253 pwi->pContext = pContext;
256 {
258 }
259 else
260 {
261 NdisFreeMemory(pwi, 0, 0);
262 }
263 }
265 {
266 ParaNdis_DebugHistory(pContext, hopSysReset, NULL, 0, status, 0);
267 }
268 return status;
269}
270
271/*************************************************************
272Callback of delayed receive pause procedure
273*************************************************************/
275{
276 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)p;
277 DEBUG_ENTRY(0);
278 NdisSetEvent(&pContext->HaltEvent);
279}
280
281/*************************************************************
282Callback of delayed send pause procedure
283*************************************************************/
285{
286 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)p;
287 DEBUG_ENTRY(0);
288 NdisSetEvent(&pContext->HaltEvent);
289}
290
291static void WaitHaltEvent(PARANDIS_ADAPTER *pContext, const char *Reason)
292{
293 UINT ms = 5000;
294 if (!NdisWaitEvent(&pContext->HaltEvent, 1))
295 {
296 while (!NdisWaitEvent(&pContext->HaltEvent, ms))
297 {
298 DPrintf(0, ("[%s]", __FUNCTION__));
299 }
300 }
301}
302
303/*************************************************************
304Required NDIS procedure
305Stops TX and RX path and finished the function of adapter
306*************************************************************/
308 IN NDIS_HANDLE MiniportAdapterContext)
309{
311 BOOLEAN bUnused;
312 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportAdapterContext;
313 DEBUG_ENTRY(0);
314
315 ParaNdis_DebugHistory(pContext, hopHalt, NULL, 1, 0, 0);
316
317 NdisCancelTimer(&pContext->ConnectTimer, &bUnused);
318 NdisResetEvent(&pContext->HaltEvent);
320 NdisSetEvent(&pContext->HaltEvent);
321 WaitHaltEvent(pContext, "Send");
322 NdisResetEvent(&pContext->HaltEvent);
324 NdisSetEvent(&pContext->HaltEvent);
325 WaitHaltEvent(pContext, "Receive");
326 ParaNdis_CleanupContext(pContext);
327 NdisCancelTimer(&pContext->DPCPostProcessTimer, &bUnused);
328 ParaNdis_DebugHistory(pContext, hopHalt, NULL, 0, 0, 0);
330 NdisFreeMemory(pContext, 0, 0);
332}
333
334
335/*************************************************************
336Called periodically (usually each 2 seconds)
337*************************************************************/
338static BOOLEAN NTAPI ParaNdis5_CheckForHang(IN NDIS_HANDLE MiniportAdapterContext)
339{
340 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportAdapterContext;
341 DEBUG_ENTRY(8);
342 return ParaNdis_CheckForHang(pContext);
343}
344
345/*************************************************************
346Required NDIS procedure
347Responsible for hardware interrupt handling
348*************************************************************/
349static VOID NTAPI ParaNdis5_MiniportISR(OUT PBOOLEAN InterruptRecognized,
350 OUT PBOOLEAN QueueMiniportHandleInterrupt,
351 IN NDIS_HANDLE MiniportAdapterContext)
352{
353 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportAdapterContext;
354 BOOLEAN b;
355 *QueueMiniportHandleInterrupt = FALSE;
356 b = ParaNdis_OnLegacyInterrupt(pContext, QueueMiniportHandleInterrupt);
357 *InterruptRecognized = b;
359}
360
361/*************************************************************
362Parameters:
363
364Return value:
365
366*************************************************************/
368 IN NDIS_DEVICE_PNP_EVENT PnPEvent,
369 IN PVOID InformationBuffer,
370 IN ULONG InformationBufferLength)
371{
372 PARANDIS_ADAPTER *pContext = (PARANDIS_ADAPTER *)MiniportAdapterContext;
373 ParaNdis_OnPnPEvent(pContext, PnPEvent, InformationBuffer, InformationBufferLength);
374}
375
376/*************************************************************
377Driver's entry point
378Parameters:
379 as usual
380Return value:
381 SUCCESS or error code
382*************************************************************/
384{
388
390
391 DEBUG_ENTRY(0);
392 _LogOutString(0, __DATE__ " " __TIME__);
393
397 NULL
398 );
399
400 if (DriverHandle)
401 {
402 NdisZeroMemory(&chars, sizeof(chars));
403 //NDIS version of the miniport
404 chars.MajorNdisVersion = NDIS_MINIPORT_MAJOR_VERSION;
405 chars.MinorNdisVersion = NDIS_MINIPORT_MINOR_VERSION;
406 //Init and destruction
407 chars.InitializeHandler = ParaNdis5_Initialize;
408 chars.HaltHandler = ParaNdis5_Halt;
409
410 //Interrupt and DPC handling
411 chars.HandleInterruptHandler = ParaNdis5_HandleDPC;
412 chars.ISRHandler = ParaNdis5_MiniportISR;
413
414 //Packet transfer - send path and notification on the send packet
415 chars.SendPacketsHandler = ParaNdis5_SendPackets;
416 chars.ReturnPacketHandler = ParaNdis5_ReturnPacket;
417
418 //OID set\get
419 chars.SetInformationHandler = ParaNdis5_SetOID;
420 chars.QueryInformationHandler = ParaNdis5_QueryOID;
421
422 //Reset
423 chars.ResetHandler = ParaNdis5_Reset;
424 chars.CheckForHangHandler = ParaNdis5_CheckForHang; //optional
425
426 chars.CancelSendPacketsHandler = ParaNdis5_CancelSendPackets;
427 chars.PnPEventNotifyHandler = ParaNdis5_PnPEventNotify;
428 chars.AdapterShutdownHandler = ParaNdis5_Shutdown;
429
432 &chars,
433 sizeof(chars));
434 }
435
437 {
439 }
440 else if (DriverHandle)
441 {
442 DPrintf(0, ("NdisMRegisterMiniport failed"));
444 }
445 else
446 {
447 DPrintf(0, ("NdisMInitializeWrapper failed"));
448 }
449
451 return status;
452}
@ hopHalt
Definition: DebugData.h:49
@ hopSysReset
Definition: DebugData.h:48
static VOID OnSendStopped(VOID *p)
static VOID NTAPI ParaNdis5_Halt(IN NDIS_HANDLE MiniportAdapterContext)
static NDIS_HANDLE DriverHandle
static NDIS_STATUS NTAPI ParaNdis5_Reset(OUT PBOOLEAN AddressingReset, IN NDIS_HANDLE MiniportAdapterContext)
static ULONG gID
static VOID NTAPI ParaNdis5_MiniportISR(OUT PBOOLEAN InterruptRecognized, OUT PBOOLEAN QueueMiniportHandleInterrupt, IN NDIS_HANDLE MiniportAdapterContext)
static void OnSendStoppedOnReset(VOID *p)
static VOID OnReceiveStopped(VOID *p)
static void NTAPI OnResetWorkItem(NDIS_WORK_ITEM *pWorkItem, PVOID Context)
VOID ParaNdis_Resume(PARANDIS_ADAPTER *pContext)
static void WaitHaltEvent(PARANDIS_ADAPTER *pContext, const char *Reason)
static void OnReceiveStoppedOnReset(VOID *p)
static BOOLEAN NTAPI ParaNdis5_CheckForHang(IN NDIS_HANDLE MiniportAdapterContext)
static VOID NTAPI ParaVirtualNICUnload(IN PDRIVER_OBJECT pDriverObject)
static NDIS_STATUS NTAPI ParaNdis5_Initialize(OUT PNDIS_STATUS OpenErrorStatus, OUT PUINT SelectedMediumIndex, IN PNDIS_MEDIUM MediumArray, IN UINT MediumArraySize, IN NDIS_HANDLE MiniportAdapterHandle, IN NDIS_HANDLE WrapperConfigurationContext)
VOID NTAPI ParaNdis5_PnPEventNotify(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_DEVICE_PNP_EVENT PnPEvent, IN PVOID InformationBuffer, IN ULONG InformationBufferLength)
VOID ParaNdis_Suspend(PARANDIS_ADAPTER *pContext)
static VOID NTAPI ParaNdis5_Shutdown(IN NDIS_HANDLE MiniportAdapterContext)
NDIS_STATUS ParaNdis5_StopReceive(PARANDIS_ADAPTER *pContext, BOOLEAN bStop, ONPAUSECOMPLETEPROC Callback)
VOID NTAPI ParaNdis5_SendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PPNDIS_PACKET PacketArray, IN UINT NumberOfPackets)
VOID NTAPI ParaNdis5_ReturnPacket(IN NDIS_HANDLE MiniportAdapterContext, IN PNDIS_PACKET Packet)
VOID NTAPI ParaNdis5_CancelSendPackets(IN NDIS_HANDLE MiniportAdapterContext, IN PVOID CancelId)
VOID NTAPI ParaNdis5_HandleDPC(IN NDIS_HANDLE MiniportAdapterContext)
NDIS_STATUS ParaNdis5_StopSend(PARANDIS_ADAPTER *pContext, BOOLEAN bStop, ONPAUSECOMPLETEPROC Callback)
NDIS_STATUS NTAPI ParaNdis5_SetOID(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesRead, OUT PULONG BytesNeeded)
NDIS_STATUS NTAPI ParaNdis5_QueryOID(IN NDIS_HANDLE MiniportAdapterContext, IN NDIS_OID Oid, IN PVOID InformationBuffer, IN ULONG InformationBufferLength, OUT PULONG BytesWritten, OUT PULONG BytesNeeded)
unsigned char BOOLEAN
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
#define __FUNCTION__
Definition: types.h:116
#define DEBUG_ENTRY(level)
Definition: kdebugprint.h:49
#define DPrintf(Level, Fmt)
Definition: kdebugprint.h:61
#define DEBUG_EXIT_STATUS(level, status)
Definition: kdebugprint.h:50
void _LogOutString(int level, const char *s)
BOOLEAN EXPORT NdisWaitEvent(IN PNDIS_EVENT Event, IN UINT MsToWait)
Definition: control.c:290
VOID EXPORT NdisResetEvent(IN PNDIS_EVENT Event)
Definition: control.c:256
VOID EXPORT NdisSetEvent(IN PNDIS_EVENT Event)
Definition: control.c:273
VOID EXPORT NdisMQueryAdapterResources(OUT PNDIS_STATUS Status, IN NDIS_HANDLE WrapperConfigurationContext, OUT PNDIS_RESOURCE_LIST ResourceList, IN OUT PUINT BufferSize)
Definition: hardware.c:103
VOID EXPORT NdisFreeMemory(IN PVOID VirtualAddress, IN UINT Length, IN UINT MemoryFlags)
Definition: memory.c:110
NDIS_STATUS EXPORT NdisScheduleWorkItem(IN PNDIS_WORK_ITEM pWorkItem)
Definition: misc.c:467
VOID EXPORT NdisCancelTimer(IN PNDIS_TIMER Timer, OUT PBOOLEAN TimerCancelled)
Definition: time.c:27
VOID EXPORT NdisSetTimer(IN PNDIS_TIMER Timer, IN UINT MillisecondsToDelay)
Definition: time.c:317
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLfloat GLfloat p
Definition: glext.h:8902
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
#define b
Definition: ke_i.h:79
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
Definition: env.c:47
NDIS_STATUS ParaNdis_FinishInitialization(PARANDIS_ADAPTER *pContext)
BOOLEAN ParaNdis_CheckForHang(PARANDIS_ADAPTER *pContext)
void ParaNdis_DebugCleanup(PDRIVER_OBJECT pDriverObject)
PVOID ParaNdis_AllocateMemory(PARANDIS_ADAPTER *pContext, ULONG ulRequiredSize)
VOID ParaNdis_CleanupContext(PARANDIS_ADAPTER *pContext)
VOID ParaNdis_OnPnPEvent(PARANDIS_ADAPTER *pContext, NDIS_DEVICE_PNP_EVENT pEvent, PVOID pInfo, ULONG ulSize)
void ParaNdis_DebugInitialize(PVOID DriverObject, PVOID RegistryPath)
void ParaNdis_DebugRegisterMiniport(PARANDIS_ADAPTER *pContext, BOOLEAN bRegister)
void ParaNdis_IndicateConnect(PARANDIS_ADAPTER *pContext, BOOLEAN bConnected, BOOLEAN bForce)
VOID ParaNdis_ReportLinkStatus(PARANDIS_ADAPTER *pContext, BOOLEAN bForce)
VOID ParaNdis_OnShutdown(PARANDIS_ADAPTER *pContext)
BOOLEAN ParaNdis_OnLegacyInterrupt(PARANDIS_ADAPTER *pContext, BOOLEAN *pRunDpc)
NDIS_STATUS ParaNdis_InitializeContext(PARANDIS_ADAPTER *pContext, PNDIS_RESOURCE_LIST ResourceList)
static void FORCEINLINE ParaNdis_DebugHistory(PARANDIS_ADAPTER *pContext, eHistoryLogOperation op, PVOID pParam1, ULONG lParam2, ULONG lParam3, ULONG lParam4)
Definition: ndis56common.h:647
enum _NDIS_DEVICE_PNP_EVENT NDIS_DEVICE_PNP_EVENT
#define NDIS_STATUS_PENDING
Definition: ndis.h:347
#define NdisInterlockedIncrement(Addend)
Definition: ndis.h:4386
#define NdisZeroMemory(Destination, Length)
Definition: ndis.h:3926
#define NdisInitializeWorkItem(_WI_, _R_, _C_)
Definition: ndis.h:3197
unsigned int * PUINT
Definition: ndis.h:50
unsigned int UINT
Definition: ndis.h:50
#define NDIS_ATTRIBUTE_BUS_MASTER
Definition: ndis.h:586
#define NdisMResetComplete(MiniportAdapterHandle, Status, AddressingReset)
Definition: ndis.h:5674
#define NDIS_STATUS_FAILURE
Definition: ndis.h:465
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT SelectedMediumIndex
Definition: ndis.h:6011
#define NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND
Definition: ndis.h:589
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
#define NDIS_ATTRIBUTE_DESERIALIZE
Definition: ndis.h:588
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _Out_ PUINT _In_ UINT MediumArraySize
Definition: ndis.h:6013
@ NdisInterfacePci
Definition: ndis.h:905
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_HANDLE _In_ NDIS_HANDLE WrapperConfigurationContext
Definition: ndis.h:3946
_In_ NDIS_HANDLE MiniportAdapterHandle
Definition: ndis.h:4668
#define NDIS_STATUS_UNSUPPORTED_MEDIA
Definition: ndis.h:490
_Must_inspect_result_ _Out_ PNDIS_STATUS _Out_ PNDIS_STATUS OpenErrorStatus
Definition: ndis.h:6009
#define NdisMInitializeWrapper(NdisWrapperHandle, SystemSpecific1, SystemSpecific2, SystemSpecific3)
Definition: ndis.h:5592
* PNDIS_STATUS
Definition: ndis.h:45
#define NDIS_STATUS_RESOURCES
Definition: ndis.h:466
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
VOID EXPORT NdisMRegisterUnloadHandler(IN NDIS_HANDLE NdisWrapperHandle, IN PDRIVER_UNLOAD UnloadHandler)
Definition: miniport.c:3151
NDIS_STATUS EXPORT NdisMRegisterMiniport(IN NDIS_HANDLE NdisWrapperHandle, IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics, IN UINT CharacteristicsLength)
Definition: miniport.c:2637
VOID EXPORT NdisTerminateWrapper(IN NDIS_HANDLE NdisWrapperHandle, IN PVOID SystemSpecific)
Definition: miniport.c:3012
enum _NDIS_MEDIUM * PNDIS_MEDIUM
@ NdisMedium802_3
Definition: ntddndis.h:188
int NDIS_STATUS
Definition: ntddndis.h:475
NDIS_WORK_ITEM wi
Definition: ParaNdis5.h:84
PPARANDIS_ADAPTER pContext
Definition: ParaNdis5.h:85
NDIS_HANDLE MiniportHandle
Definition: ndis56common.h:349
NDIS_HANDLE WrapperConfigurationHandle
Definition: ndis56common.h:481
NDIS_HANDLE DriverHandle
Definition: ndis56common.h:348
NDIS_TIMER DPCPostProcessTimer
Definition: ndis56common.h:486
NDIS_TIMER ConnectTimer
Definition: ndis56common.h:485
Definition: ps.c:97
unsigned char * PBOOLEAN
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213