The OID_PNP_SET_POWER OID notifies a miniport driver that its underlying network adapter will be transitioning to the device power state specified in the InformationBuffer. The device power state is specified as one of the following NDIS_DEVICE_POWER_STATE values:

  • NdisDeviceStateD0
  • NdisDeviceStateD1
  • NdisDeviceStateD2
  • NdisDeviceStateD3

An OID_PNP_SET_POWER request may be preceded by an OID_PNP_QUERY_POWER request.

Starting with NDIS 6.30, NDIS will not pause and restart the NDIS drivers in the driver stack during power-state transitions if the following conditions are true:

  • The underlying miniport driver sets the NDIS_MINIPORT_ATTRIBUTES_NO_PAUSE_ON_SUSPEND flag in the NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES structure. The driver passes a pointer to this structure in its call to the NdisMSetMiniportAttributes function.

  • All overlying filter drivers that are attached to the miniport driver support NDIS 6.30 or later versions of NDIS.

  • All overlying protocol drivers that are bound to the miniport driver support NDIS 6.30 or later versions of NDIS.

Transitioning to a Low-Power State (D1-D3)

When the miniport driver handles a set request of OID_PNP_SET_POWER to transition to a low-power state, it must do the following:

The miniport driver that supports NDIS 6.30 and later versions of NDIS must also do the following:

  • Not wait for the completion of pending receive indications through calls to its MiniportReturnNetBufferLists function. Also, the miniport driver must not alter the NET_BUFFER_LIST structure or data for any packets that are waiting to be completed.

  • Handle the OID_PNP_SET_POWER request to a low-power state from either the Paused or Running adapter states. For more information about these states, see Miniport Adapter States and Operations.

Before the network adapter transitions to the D3 state, the miniport driver must turn off everything under the miniport driver's control by performing the following tasks:

  • Disable interrupts and the DMA engine on the network adapter.

  • Stop the receive engine on the network adapter.

  • Do not deallocate or modify receive descriptors and packet buffers that are associated with pending receive indications.

  • Cancel all NDIS timers.

Note  A miniport driver cannot access the network adapter after the bus driver has transitioned the network adapter to the D3 state.

Transitioning to the Full-Power State (D0)

When the miniport driver handles a set request of OID_PNP_SET_POWER to transition to a full-power state, it must restore the receive engine of the network adapter to the same state that the receive engine was in before the adapter was transitioned to the low-power state.

Note  The miniport driver must not access or change any receive buffers that are associated with pending receive indications.

NDIS calls the miniport driver's MiniportRestart function after the transition to a full-power state only if NDIS called the driver's MiniportPause function before the transition to a low-power state.

Note  An intermediate driver must always return NDIS_STATUS_SUCCESS to a query of OID_PNP_SET_POWER. An intermediate driver should never propagate an OID_PNP_SET_POWER request to an underlying miniport driver.

Return status codes

The miniport driver's MiniportOidRequest function returns one of the following values for this request:

Term Description


The miniport driver completed the request successfully.


The miniport driver will complete the request asynchronously. After the miniport driver has completed all processing, it must succeed the request by calling the NdisMOidRequestComplete function, passing NDIS_STATUS_SUCCESS for the Status parameter.


The miniport driver is resetting.



Supported for NDIS 5.1, and NDIS 6.0 and later.


Ntddndis.h (include Ndis.h)

See also