Reporting Wake Reason Status Indication Capabilities
Starting with NDIS 6.30, the miniport driver must report whether it can issue an NDIS wake reason status indication (NDIS_STATUS_PM_WAKE_REASON) to report wake-up events caused by one of the following:
The network adapter received a packet that matched a wake-on-LAN (WOL) pattern. This includes the receipt of a packet that matches a receive filter specified through an object identifier (OID) set request of OID_GEN_CURRENT_PACKET_FILTER.
Note For this type of wake reason status indication, the network adapter must be able to save the received packet. The driver must return the received packet within the status indication.
The network adapter detected a media-specific event, such as a disassociation from an 802.11 access point (AP) or the receipt of a mobile broadband (MB) Short Message Service (SMS) message.
The network adapter detected another enabled event that is not specific to a WOL pattern or media type (media-independent event). For example, the miniport driver issues the NDIS_STATUS_PM_WAKE_REASON status indication if it enabled the network adapter to detect media connection or disconnection.
Note Support for NDIS wake reason status indications is optional for Mobile Broadband (MB) miniport drivers.
When NDIS calls the driver's MiniportInitializeEx function, the miniport driver reports its wake reason status indication capabilities by following these steps:
The miniport driver initializes an NDIS_PM_CAPABILITIES structure with the power management capabilities of the underlying hardware.
To enable the support for wake reason status indications, the miniport driver must set the members of the NDIS_PM_CAPABILITIES structure as follows:
The miniport driver must specify NDIS_PM_CAPABILITIES_REVISION_2 and NDIS_SIZEOF_NDIS_PM_CAPABILITIES_REVISION_2 for the revision and length of the NDIS_PM_CAPABILITIES structure within the structure's Header member.
If the network adapter can store the received packet that caused a system wake-up event, the miniport driver sets the NDIS_PM_WAKE_PACKET_INDICATION_SUPPORTED flag within the Flags member of this structure.
If this flag is set, the network adapter must be able to save the received packet that caused the adapter to generate a wake-up event. In addition, the miniport driver must be able to do the following with this packet after the network adapter transitions to a full-power state:
The miniport driver must be able to indicate the packet by calling NdisMIndicateReceiveNetBufferLists.
The miniport driver must be able to issue an NDIS_STATUS_PM_WAKE_REASON status indication and must pass the packet with indication.
The miniport driver sets the MaxWoLPacketSaveBuffer member to the maximum size, in units of bytes, of the buffer that contains the WOL packet that caused a system wake-up event.
The value of the MaxWoLPacketSaveBuffer member must be less than or equal to the size, in bytes, of the maximum transmission unit (MTU) and media access control (MAC) header for the network media. The driver reports the MTU size through OID query requests of OID_GEN_MAXIMUM_FRAME_SIZE.
The miniport driver sets the SupportedWakeUpEvents to the media-independent wake-up events that the network adapter supports, such as generating a wake-up event when the adapter becomes connected to the networking interface.
The miniport driver sets the MediaSpecificWakeUpEvents to the media-specific wake-up events that the network adapter supports. These events include generating a wake-up event when the 802.11 adapter becomes disassociated with the AP.
The miniport driver initializes an NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure and sets thePowerManagementCapabilitiesEx member to the address of the initialized NDIS_PM_CAPABILITIES structure.
The miniport driver calls the NdisMSetMiniportAttributes function to register its power management capabilities. When the miniport driver calls this function, it sets the MiniportAttributes parameter to the address of the NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure.
The method that is used by miniport drivers to report the wake reason status indication capabilities is based on the NDIS 6.20 method for reporting power management capabilities. For more information about this method, see Reporting Power Management Capabilities.
For more information about the adapter initialization process, see Initializing a Miniport Adapter.
For more information about how to report power management capabilities, see Reporting Power Management Capabilities.