Overview of NDIS Wake Reason Status Indications

Starting with NDIS 6.30, miniport drivers issue an NDIS wake reason status indication (NDIS_STATUS_PM_WAKE_REASON) to notify NDIS and overlying drivers about the reason for a system wake-up event. If the network adapter generates a wake-up event, the miniport driver immediately issues an NDIS status indication of NDIS_STATUS_PM_WAKE_REASON when the network adapter resumes to a full-power state.

Note  Support for NDIS wake reason status indications is optional for Mobile Broadband (MB) miniport drivers.

The miniport driver is configured with power management (PM) parameters through an object identifier (OID) set request of OID_PM_PARAMETERS. This OID request specifies the PM parameters through an NDIS_PM_PARAMETERS structure.

The NDIS_PM_PARAMETERS structure specifies the parameters for the following types of wake-up events.

Received Packet Wake-up Events
The network adapter generates a wake-up event if it receives a packet that matched a wake-on-LAN (WOL) pattern. WOL patterns include the following:

  • Media-independent WOL patterns, such as magic packets or TCP/IP data patterns within the packet payload. For example, the NDIS_PM_PARAMETERS structure could specify a WOL pattern for a TCP SYN frame.

  • Media-specific WOL patterns, such as an EAPOL request identifier packet or mobile broadband (MB) Short Message Service (SMS) message.

  • Wildcard patterns that match a receive filter specified through an 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.

WOL patterns are specified through the EnabledWoLPacketPatterns member of the NDIS_PM_PARAMETERS structure.

Media-Specific Wake-up Events
The network adapter generates a wake-up event because of a media-specific reason, such as a disassociation from an 802.11 access point (AP) or the receipt of a mobile broadband (MB) Short Message Service (SMS) message.

Wake-up events of this type are specified through the MediaSpecificWakeUpEvents member of the NDIS_PM_PARAMETERS structure.

Media-Independent Wake-up Events
The network adapter generates a wake-up event because of a media-independent reason, such as media connection or disconnection.

Wake-up events of this type are specified through the WakeUpFlags member of the NDIS_PM_PARAMETERS structure.

The miniport driver must follow these guidelines for NDIS wake reason status indications:

  • If the miniport driver supports the ability to issue wake packet indications, it must report this ability when NDIS calls the driver's MiniportInitializeEx function. For more information, see Reporting Wake Reason Status Indication Capabilities.

    Note  The miniport driver does not have to report its ability to issue NDIS wake reason status indications for events that are not related to the receipt of a WOL packet.

  • When the miniport driver issues a wake packet indication for a WOL packet, it must include the packet that caused the wake-up event. For more information, see Issuing NDIS Wake Reason Status Indications.

  • If the network adapter generated a wake-up signal, the miniport driver must issue an NDIS_STATUS_PM_WAKE_REASON status indication. The driver does this while it is handling the OID set request of OID_PNP_SET_POWER for the transition to a full-power state.

  • The miniport driver must issue an NDIS_STATUS_PM_WAKE_REASON status indication before it issues a status indication that is related to the wake-up event. For example, if the wake-up event was due to a change in the media connectivity state, the miniport driver must issue an NDIS_STATUS_LINK_STATE status indication after it has issued the NDIS_STATUS_PM_WAKE_REASON status indication.

  • The miniport driver must ssue an NDIS_STATUS_PM_WAKE_REASON status indication only for power management events that were previously enabled through an OID set request of OID_PM_PARAMETERS.

  • The miniport driver must issue an NDIS_STATUS_PM_WAKE_REASON status indication only for wake-up events that were generated by the underlying network adapter.