mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
- Add and register a ProtocolPnPEvent handler with some stubs in it
svn path=/trunk/; revision=40803
This commit is contained in:
parent
95370b97d2
commit
1aa2291065
1 changed files with 29 additions and 0 deletions
|
@ -514,6 +514,34 @@ VOID NTAPI ProtocolStatus(
|
|||
}
|
||||
}
|
||||
|
||||
NDIS_STATUS NTAPI
|
||||
ProtocolPnPEvent(
|
||||
NDIS_HANDLE NdisBindingContext,
|
||||
PNET_PNP_EVENT PnPEvent)
|
||||
{
|
||||
switch(PnPEvent->NetEvent)
|
||||
{
|
||||
case NetEventSetPower:
|
||||
DbgPrint("Device transitioned to power state %ld\n", PnPEvent->Buffer);
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
|
||||
case NetEventQueryPower:
|
||||
DbgPrint("Device wants to go into power state %ld\n", PnPEvent->Buffer);
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
|
||||
case NetEventQueryRemoveDevice:
|
||||
DbgPrint("Device is about to be removed\n");
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
|
||||
case NetEventCancelRemoveDevice:
|
||||
DbgPrint("Device removal cancelled\n");
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
|
||||
default:
|
||||
DbgPrint("Unhandled event type: %ld\n", PnPEvent->NetEvent);
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
VOID NTAPI ProtocolStatusComplete(
|
||||
NDIS_HANDLE NdisBindingContext)
|
||||
|
@ -1275,6 +1303,7 @@ NTSTATUS LANRegisterProtocol(
|
|||
ProtChars.StatusHandler = ProtocolStatus;
|
||||
ProtChars.StatusCompleteHandler = ProtocolStatusComplete;
|
||||
ProtChars.BindAdapterHandler = ProtocolBindAdapter;
|
||||
ProtChars.PnPEventHandler = ProtocolPnPEvent;
|
||||
|
||||
/* Try to register protocol */
|
||||
NdisRegisterProtocol(&NdisStatus,
|
||||
|
|
Loading…
Reference in a new issue