How NDIS Detects Idle Network Adapters
After the miniport driver has enabled NDIS selective suspend and registered its handler functions, NDIS monitors the I/O activity of the network adapter in the following way:
NDIS monitors the calls to the I/O handler functions that the miniport driver registers through the NDIS_MINIPORT_DRIVER_CHARACTERISTICS and NDIS_MINIPORT_PNP_CHARACTERISTICS structures. For example, NDIS monitors calls to the miniport driver's MiniportSendNetBufferLists or MiniportReturnNetBufferLists to determine whether the driver is involved in any packet I/O activity.
NDIS also monitors the calls of NdisOidRequest and NdisDirectOidRequest made by overlying protocol drivers.
Note NDIS monitors only those object identifier (OID) requests to the underlying miniport driver that are not handled directly by NDIS.
NDIS determines that the network adapter is idle if it does not detect any activity on the adapter for an idle time-out period. The duration of this time-out period is specified by the value of the *SSIdleTimeout standardized INF keyword. For more information about this keyword, see Standardized INF Keywords for NDIS Selective Suspend.
After the network adapter has become idle, NDIS starts the selective suspend operation. Through this operation, the network adapter is suspended by transitioning it to a low-power state.
NDIS begins this selective suspend operation by issuing an idle notification to the miniport driver. NDIS does this by calling the driver's MiniportIdleNotification handler function. For more information about how the miniport driver handles this notification, see Handling the NDIS Selective Suspend Idle Notification.
If NDIS detects that I/O requests to the network adapter are issued from overlaying drivers or if the adapter signals a wake-up event, NDIS cancels the idle notification. NDIS does this by calling the miniport driver's MiniportCancelIdleNotification handler function.
For more information about how NDIS cancels the idle notification, see Canceling the NDIS Selective Suspend Idle Notification.
For more information about how the miniport driver completes the idle notification, see Completing the NDIS Selective Suspend Idle Notification.